A fix for security problem in rbldnsd-0.97 and 0.97a:
wrong per-zone statistic counters.

--- rbldnsd.c	1 Aug 2003 09:30:31 -0000	1.49
+++ rbldnsd.c	5 Aug 2003 23:26:41 -0000	1.50
@@ -1,4 +1,4 @@
-/* $Id: rbldnsd.c,v 1.49 2003/08/01 09:30:31 mjt Exp $
+/* $Id: rbldnsd.c,v 1.50 2003/08/05 23:26:41 mjt Exp $
  * rbldnsd: main program
  */
 
@@ -603,6 +603,7 @@
     if (q <= 0)			/* interrupted? */
       continue;
 
+    zone = NULL;
     r = replypacket(&pkt, q, zonelist, &zone);
     if (!r) {
 #ifndef NOSTATS
@@ -614,7 +615,8 @@
     if (flog)
       logreply(&pkt, (struct sockaddr *)&sa, salen, flog, flushlog);
 #ifndef NOSTATS
-    switch(pkt.p_buf[3]) {
+    if (!zone) { stats.nbad += 1; stats.ibad += 1; }
+    else switch(pkt.p_buf[3]) {
     case DNS_R_NOERROR:
       zone->z_stats.nrep += 1; zone->z_stats.irep += q; zone->z_stats.orep += r;
       zone->z_stats.arep += pkt.p_buf[7]; /* arcount */
