* [PATCH] mlmmj-receive-strip segfault
@ 2008-02-03 14:23 Chris Webb
0 siblings, 0 replies; only message in thread
From: Chris Webb @ 2008-02-03 14:23 UTC (permalink / raw)
To: mlmmj
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:
--- a/contrib/receivestrip/mlmmj-receive-strip.c 2008-02-01 09:24:06.000000000 +0000
+++ b/contrib/receivestrip/mlmmj-receive-strip.c 2008-02-03 13:30:47.000000000 +0000
@@ -81,6 +81,9 @@ static int findit(char *line, char **hea
int 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.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-02-03 14:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-03 14:23 [PATCH] mlmmj-receive-strip segfault Chris Webb
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.