blob: dad814a17a9d2db47f584644c5d58be355e6f035 [file] [log] [blame]
--- ssmtp.c.orig 2009-02-18 15:17:23.000000000 +0200
+++ ssmtp.c 2009-02-18 15:19:54.000000000 +0200
@@ -1376,7 +1376,7 @@
ssize_t outbytes = 0;
va_start(ap, format);
- if(vsnprintf(buf, (BUF_SZ - 2), format, ap) == -1) {
+ if(vsnprintf(buf, BUF_SZ, format, ap) == -1) {
die("smtp_write() -- vsnprintf() failed");
}
va_end(ap);
@@ -1643,7 +1643,7 @@
/* don't hang forever when reading from stdin */
while(!feof(stdin) && timeout < MEDWAIT) {
- if (!fgets(buf, sizeof(buf), stdin)) {
+ if (!fgets(buf, sizeof(buf)-2, stdin)) {
/* if nothing was received, then no transmission
* over smtp should be done */
sleep(1);