mlmmj-receive-strip segfault
PATCH 1/1 mlmmj-receive-strip segfault
Hi. mlmmj-receive-strip segfaults if either control/mimedeny or control/mimestrip exist but contain no non-empty lines. (In this case, ctrlvalues() returns a non-NULL pointer to a strlist with a NULL strs, which gets passed to findit() and needs to be handled correctly.)
The following tiny patch against mlmmj-1.2.15 fixes this:
contrib/receivestrip/mlmmj-receive-strip.c +3 -0
@@ -81,6 +81,9 @@ static int findit(char *line, char **heaint i =0 ;size_t len; +if (!headers) +return 0 ; +while (headers[i]) { len =strlen (headers[i]);if (strncasecmp (line, headers[i], len) =0 )
One other note: the mlmmj-receive-strip README probably ought to mention that, if you're using mlmmj-receive-strip in place of mlmmj-receive, control/delheaders should contain X-ThisMailContainsUnwantedMimeParts: to prevent every message that goes out to the list having a spurious
X-ThisMailContainsUnwantedMimeParts: N
header added to every message. This header is added regardless of whether or not the control/mimedeny feature is in use. It can safely be stripped as this happens after control/access has a chance to deny on the presence of a Y.
Best wishes,
Chris.