From: Chris Webb <chris@arachsys.com>
To: mlmmj@mlmmj.org
Subject: [PATCH] mlmmj-receive-strip segfault
Date: Sun, 03 Feb 2008 14:23:38 +0000 [thread overview]
Message-ID: <20080203142338.GO16020@arachsys.com> (raw)
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.
reply other threads:[~2008-02-03 14:23 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080203142338.GO16020@arachsys.com \
--to=chris@arachsys.com \
--cc=mlmmj@mlmmj.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.