File squid_dns_dos_bnc576087.patch of Package squid-beta

patch adjusted by lpechacek@suse.cz - removed the version string hunk
---------------------
PatchSet 12597 
Date: 2010/01/15 11:40:30
Author: amosjeffries
Branch: HEAD
Tag: (none) 
Log:
Handle DNS header-only packets as invalid.

Members: 
	lib/rfc1035.c:1.30->1.31 

Index: squid/lib/rfc1035.c
===================================================================
RCS file: /cvsroot/squid/squid/lib/rfc1035.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- squid/lib/rfc1035.c	15 Jun 2008 03:49:55 -0000	1.30
+++ squid/lib/rfc1035.c	15 Jan 2010 11:40:30 -0000	1.31
@@ -286,7 +286,9 @@
     size_t len;
     assert(ns > 0);
     do {
-	assert((*off) < sz);
+	if ((*off) >= sz) {
+	    return 1;
+	}
 	c = *(buf + (*off));
 	if (c > 191) {
 	    /* blasted compression */