c5ad21d92b
Submitted by Patroklos Argyroudis <argp@bsd.gr>. 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.
13 lines
481 B
Plaintext
13 lines
481 B
Plaintext
$OpenBSD: patch-smtpclient_errno_c,v 1.1.1.1 2001/08/13 01:06:41 naddy Exp $
|
|
--- 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]);
|