freebsd-ports/dns/djbdns/files/patch-response.c
Peter Pentchev 12744b2e80 Fix the AXFR subdomain overwrite vulnerability discovered by
Matthew Dempsky.  Also, fix the quoting of the BROKEN messages.

PR:		132366, 132349
Submitted by:	Renato Botelho <garga@FreeBSD.org>,
		Howard Goldstein <hg@queue.to>
2009-03-06 16:20:16 +00:00

11 lines
403 B
C

--- response.c.orig 2009-03-06 13:02:27.000000000 -0300
+++ response.c 2009-03-06 13:03:03.000000000 -0300
@@ -34,7 +34,7 @@
uint16_pack_big(buf,49152 + name_ptr[i]);
return response_addbytes(buf,2);
}
- if (dlen <= 128)
+ if ((dlen <= 128) && (response_len < 16384))
if (name_num < NAMES) {
byte_copy(name[name_num],dlen,d);
name_ptr[name_num] = response_len;