[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [leafnode-list] Seg-fault on fetchnews



Aquarion schrieb am 2003-10-11:

> That is, when certian messages are in spool/in.coming/, fetchnews
> segfaults consistantly. I've managed to capture one of the messages
> that consistantly causes fetchnews to segfault, and archived it at
> <http://www.aquarionics.com/tempstuff/crash-leafnode-3070-1065772500-1>
> (in case it makes a difference, the original filename is
> 3070-1065772500-1) 
> 
> I'm assuming that message has some property which breaks Leafnode, and
> if so I can hack pyg (the gateway) to either parse it out or get
> procmail not to gateway messages with that property, but as I can't
> see anything wrong with the message, I can't filter on it.

As written previously, the software at fault is either the mailer or the
mail2news gateway that emits invalid Message-ID: headers.

This patch will prevent leafnode from crashing and move the article to
failed.postings (Rainer, this patch is not for you!):

Index: store.c
===================================================================
RCS file: /var/CVS/leafnode-2/store.c,v
retrieving revision 1.46
diff -u -r1.46 store.c
--- store.c	28 Aug 2003 16:44:28 -0000	1.46
+++ store.c	12 Oct 2003 14:59:23 -0000
@@ -452,6 +452,9 @@
 
     /* now create link in message.id */
     m = lookup(mid);
+    if (!m)
+	BAIL(-3, "Message-ID header missing or malformatted");
+
     if (delayflg == 3 ? link_force(mastr_str(tmpfn), m)
 	    : link(mastr_str(tmpfn), m)) {
 	if (errno == ENOENT) {	/* message.id directory missing, create */

-- 
leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx -- mailing list for leafnode
To unsubscribe, send mail with "unsubscribe" in the subject to the list