Whilst hacking a user-requested feature into Hypermail (they want to set a second "label" for each monthly archive that can be included as a "percent-character" item), I found a buffer overrun bug in mdecode2047() that results in a seg fault or bus error. This only happens when a header line is more than MAXLINE-1 characters and the message is a MIME-encoded message ("Mime-Version: 1.0").
This may have already been fixed by Kevin, but I had to develop a patch to get it working in the meantime. It's included below, along with a "test" message if you're interested in regression testing.
BTW, I'm not planning to send a patch for my user-requested feature, but if anyone's interested, I will make one. It uses "%L" for header/footer replacement, "-L" for a command line switch, and defaults to "Mmm YYYY" as a default, for example, "Aug 1998".
Dave
--
David D. Kilzer \ Dr. Beverly Crusher, Stardate 44181.2: Software Designer / ``If there's nothing wrong with me, maybe Raytheon Systems Company \ there's something wrong with the universe.'' ddkilzer_at_ti.com / _Star Trek: The Next Generation_
------- Patch
--- parse.c.cln Thu Aug 6 17:26:54 1998
+++ parse.c Thu Aug 6 18:02:26 1998
static char *mdecodeRFC2047( char *string ) {
char *iptr = string; char *oldptr;
char *output = storage;
_at_@ -725,10 +727,13 @@
puts(""); } #endif - return strsav(storage); /* return new */ + return storage; /* return new */ } else + { + free(storage); return string;
/*
------- End of Patch
This archive was generated by hypermail 2.3.0 : Sat 13 Mar 2010 03:46:11 AM GMT GMT