? nsd
? nsd-notify
? nsdc.conf.sample
? nsdc.sh
? zonec
Index: Makefile
===================================================================
RCS file: /cvs/nsd/Attic/Makefile,v
retrieving revision 1.84.2.3
diff -u -r1.84.2.3 Makefile
--- Makefile	2 Jan 2003 10:43:14 -0000	1.84.2.3
+++ Makefile	17 Jul 2003 09:15:08 -0000
@@ -67,7 +67,7 @@
 #
 
 # The directory where the nsd nsdc and zonec binaries will be installed
-PREFIX		= /usr/local
+PREFIX		= /home/erik/opt/nsd
 NSDBINDIR	= ${PREFIX}/sbin
 NSDMANDIR	= ${PREFIX}/man/man8
 
@@ -78,7 +78,7 @@
 NSDZONES	= ${NSDZONESDIR}/nsd.zones
 
 # The pid file of the nsd
-NSDPIDFILE      = /var/run/nsd.pid
+NSDPIDFILE      = ${PREFIX}/var/run/nsd.pid
 
 # The NSD run-time database
 NSDDB           = ${NSDZONESDIR}/nsd.db
@@ -142,7 +142,7 @@
 #
 #	Please see DBFLAGS below to switch the internal database type.
 #
-FEATURES	= -DLOG_NOTIFIES -DINET6 -DHOSTS_ACCESS -DBIND8_STATS
+FEATURES	= -DLOG_NOTIFIES -DHOSTS_ACCESS -DBIND8_STATS
 LIBWRAP		= -lwrap
 
 # To compile NSD with internal red-black tree database
Index: query.c
===================================================================
RCS file: /cvs/nsd/query.c,v
retrieving revision 1.83
diff -u -r1.83 query.c
--- query.c	14 Oct 2002 13:12:16 -0000	1.83
+++ query.c	17 Jul 2003 09:15:08 -0000
@@ -397,9 +397,10 @@
 	qname = qptr = q->iobuf + QHEADERSZ;
 	while(*qptr) {
 		/*  If we are out of buffer limits or we have a pointer in question dname or the domain name is longer than MAXDOMAINLEN ... */
-		if((qptr + *qptr > q->iobufptr) || (*qptr & 0xc0) ||
-			((qptr - q->iobuf + *qptr) > MAXDOMAINLEN)) {
-
+		if ((*qptr & 0xc0) ||
+		    (qptr + *qptr + 1 > q->iobufptr) || 
+		    (qptr + *qptr + 1 > q->iobuf + QHEADERSZ + MAXDOMAINLEN))
+		{
 			query_formerr(q);
 			return 0;
 		}
