summaryrefslogtreecommitdiff
blob: 119cea2c29f872b65fd67d52d0ab9bebaa9aceeb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--- ssmtp.c.old	2009-09-11 11:51:01.000000000 +0200
+++ ssmtp.c	2009-09-11 11:52:10.000000000 +0200
@@ -455,7 +455,7 @@
 */
 char *from_format(char *str, bool_t override_from)
 {
-	char buf[(BUF_SZ + 1)];
+	char buf[(BUF_SZ + 1)] = "";
 
 	if(override_from) {
 		if(minus_f) {
@@ -484,6 +484,10 @@
 			if(snprintf(buf, BUF_SZ, "\"%s\" <%s>", gecos, str) == -1) {
 				die("from_format() -- snprintf() failed");
 			}
+		} else {
+			if(snprintf(buf, BUF_SZ, "%s", str) == -1) {
+				die("from_format() -- snprintf() failed");
+			}
 		}
 	}