[Fwd: [Fwd: Re: behavior of k.root-servers.net]]

Erik Rozendaal erik at NLnetLabs.nl
Thu Jul 17 12:19:29 CEST 2003


Again, for the nsd-users email list this time.

-------- Original Message --------
Subject: [Fwd: Re: behavior of k.root-servers.net]
Date: Thu, 17 Jul 2003 11:18:34 +0200
From: Erik Rozendaal <erik at nlnetlabs.nl>
To: nsd-users-request at nlnetlabs.nl,  yasuhiro at jprs.co.jp,  dknight at ripe.net

Argh... use this patch instead for 1.0.2.  The other included accidental
Makefile changes :(

Erik

-------------- next part --------------
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:17:33 -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;
 		}



More information about the nsd-users mailing list