summaryrefslogtreecommitdiff
blob: dad814a17a9d2db47f584644c5d58be355e6f035 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- 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);