Skip to contentSkip to conversation

incorrect Date header

PATCH Applied Jakob Hirsch 2 participants 2 messages May 13, 2005 – May 16, 2005

lore
Share & tools
lore
#0 lore raw

Hi,

mlmmj's Date header is possibly not RFC2822 compliant (discovered by spamassassin, not by me). The attached patch fixes this.

strgen.c +1 -2
@@ -246,7 +246,6 @@
 
 	/* 6 + 26 + ' ' + timezone which is 5 + '\n\0' == 40 */
 	timestr = (char *)malloc(40);
-	strcpy(timestr, "Date: ");
 	t = time(NULL);
 
 	localtime_r(&t, &lttm);
@@ -311,7 +310,7 @@
 	}
 
 
-	snprintf(timestr, 40, "Date: %s, %02d %s %d %d:%d:%d %+05d\n",
+	snprintf(timestr, 40, "Date: %s, %02d %s %04d %02d:%02d:%02d %+05d\n",
 			weekday, lttm.tm_mday, month, lttm.tm_year + 1900,
 			lttm.tm_hour, lttm.tm_min, lttm.tm_sec, ((int)t)/36);
 
#1 lore raw
Quoted 4 lines · Jakob Hirsch

Hi,

mlmmj's Date header is possibly not RFC2822 compliant (discovered by spamassassin, not by me). The attached patch fixes this.

Thanks applied to CVS.

Signature · 4 lines
Mads Martin Joergensen, http://mmj.dk
"Why make things difficult, when it is possible to make them cryptic
 and totally illogical, with just a little bit more effort?"
                                -- A. P. J.