bug of xhdr

Katsuhiro Kondou kondou at nec.co.jp
Mon Aug 30 16:05:47 UTC 1999


In article <19990830172631.A12631 at clipper.ens.fr>,
	Damien Masse <masse at clipper.ens.fr> wrote;

} I found this bug in INN version 2.2 (and version 2.1) :
} when you ask for the last header of the overview file with the 'xhdr'
} command, nnrp displays each header followed by a "\n<number> ".
} Either because the function OVERGetHeader in nnrpd/article.c should
} test the end of line (and doesn't do it), or because the function
} OVERfind should put a '\0' at the end of the line it returns.
} 
} Hope this was not already fixed.

Attached would fix and just committed.
-- 
Katsuhiro Kondou

--- nnrpd/article.c.orig	Mon Apr 19 16:24:12 1999
+++ nnrpd/article.c	Tue Aug 31 01:00:35 1999
@@ -1089,7 +1089,7 @@
     }
 
     /* Figure out length; get space. */
-    if ((next = strchr(p, '\t')) != NULL)
+    if ((next = strpbrk(p, "\t\r\n")) != NULL)
 	i = next - p;
     else
 	i = strlen(p);


More information about the inn-workers mailing list