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

[leafnode-list] Bug in current alpha version



Hi!

I found a bug in nntpd.c of the current leafnode snapshots. When using
LIST ACTIVE (and probably LIST NEWSGROUPS) with a non-existing
newsgroup name, a NULL pointer derefernce occures. The bug seems
to have introduced in 2.0.0.alpha20031218a (well, leafnode stopped working
for me with that version).

The following (trivial) patch fixes it for me:

--- leafnode-2.0.0.alpha20040108a/nntpd.c	2004-01-05 15:07:11.000000000 +0100
+++ leafnode-2.0.0.alpha20040108a_fixed/nntpd.c	2004-01-13 22:52:40.000000000 +0100
@@ -993,7 +993,9 @@
     if (!is_pattern(pattern)) {
 	/* accelerate */
 	ng = findgroup(pattern, active, -1);
-	printlist(ng, what);
+	if (ng) {
+	    printlist(ng, what);
+	}
     } else {
 	ng = g;
 	while (ng->name) {
Best regards,
    Hans-Jürgen
-- 
Thunder rolled. ... It rolled a six.

                         -- (Terry Pratchett, Guards! Guards!)
-- 
_______________________________________________
leafnode-list mailing list
leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
http://www.dt.e-technik.uni-dortmund.de/mailman/listinfo/leafnode-list
http://leafnode.sourceforge.net/