1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-21 08:42:23 +00:00
freebsd-ports/mail/smtpclient/files/patch-smtpclient_errno_c
Kris Kennaway 0e61002d04 Add smtpclient-1.0.0
This program is a minimal SMTP client that takes an email
message body and passes it on to a SMTP server (default is the
MTA on the local host). Since it is completely self-supporting,
it is especially suitable for use in restricted environments.

Obtained from:	OpenBSD
2001-08-25 10:14:13 +00:00

12 lines
404 B
Plaintext

--- smtpclient_errno.c.orig Wed Aug 1 15:09:39 2001
+++ smtpclient_errno.c Wed Aug 1 15:11:36 2001
@@ -91,7 +91,7 @@ char *errorstr(int errnum)
#else
static char buffer[50];
if (errnum < 0 || errnum >= sys_nerr) {
- sprintf(buffer, "ERR-UNKNOWN (%d)", errnum);
+ snprintf(buffer, (sizeof(buffer) - 1), "ERR-UNKNOWN (%d)", errnum);
return(buffer);
}
return(sys_errlist[errnum]);