------------------------------------------------------------ revno: 9151 revision-id: squid3@treenet.co.nz-20100116035151-y4bx46qpg26jieae parent: squidadm@squid-cache.org-20100109033727-hfve00pjf2sk2u9o committer: Amos Jeffries branch nick: SQUID_3_0 timestamp: Sat 2010-01-16 16:51:51 +1300 message: Handle DNS header-only packets as invalid. ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20100116035151-y4bx46qpg26jieae # target_branch: http://www.squid-cache.org/bzr/squid3/branches\ # /SQUID_3_0/ # testament_sha1: 792971de9c15c8180b33b55e862325f52ba1a244 # timestamp: 2010-01-16 03:57:46 +0000 # source_branch: http://www.squid-cache.org/bzr/squid3/branches\ # /SQUID_3_0 # base_revision_id: squidadm@squid-cache.org-20100109033727-\ # hfve00pjf2sk2u9o # # Begin patch === modified file 'lib/rfc1035.c' --- lib/rfc1035.c 2007-12-06 09:37:15 +0000 +++ lib/rfc1035.c 2010-01-16 03:51:51 +0000 @@ -288,6 +288,10 @@ assert(ns > 0); do { assert((*off) < sz); + if ((*off) >= sz) { + RFC1035_UNPACK_DEBUG; + return 1; + } c = *(buf + (*off)); if (c > 191) { /* blasted compression */