INN segfault in MaxLength()

Pekka Pietikainen pp at netppl.fi
Thu Nov 18 13:53:54 UTC 1999


This morning I started getting regular crashes in INN only a few
moments after startup. When debugging the problem I got the following: 

Program received signal SIGSEGV, Segmentation fault.
0x8055119 in MaxLength (p=0x0, q=0x0) at innd.c:136
136         i = strlen(p);
(gdb) bt
#0  0x8055119 in MaxLength (p=0x0, q=0x0) at innd.c:136
#1  0x804dc0c in ARTpost (cp=0x40102268) at art.c:2298
#2  0x8056d52 in NCpostit (cp=0x40102268) at nc.c:197
#3  0x80580c2 in NCproc (cp=0x40102268) at nc.c:937
#4  0x80587f6 in NCreader (cp=0x40102268) at nc.c:1164
#5  0x80536cc in CHANreadloop () at chan.c:946
#6  0x80567fa in main (ac=2, av=0xbffffe94) at innd.c:944

And here's a very quick-n-dirty band-aid patch (for the latest stable
snapshot):  

--- /tmp/art.c	Thu Nov 18 15:32:18 1999
+++ art.c	Thu Nov 18 15:15:52 1999
@@ -2293,6 +2293,7 @@
     distributions = *p ? CommaSplit(p) : NULL;
     if (distributions) {
 	DISTparse(distributions, &Data);
+	if(distributions[0]) {
 	if (ME.Distributions
 	 && !DISTwantany(ME.Distributions, distributions)) {
 	    (void)sprintf(buff, "%d Unwanted distribution \"%s\"",
@@ -2306,6 +2307,9 @@
 	    DISPOSE(distributions);
 	    ARTreject(REJECT_DISTRIB, cp, buff, article);
 	    return buff;
+	} } else {
+		Data.Distribution = "?";
+		Data.DistributionLength = 1;
 	}
     }
     else {

-- 
Pekka Pietikainen, Net People Ltd., Oulu, Finland




More information about the inn-bugs mailing list