------------------------------------------------------------ revno: 9163 revision-id: squid3@treenet.co.nz-20100202090412-afvv2p4oy0x1emf0 parent: squid3@treenet.co.nz-20100202085731-fazi5652unowyjsz committer: Amos Jeffries branch nick: SQUID_3_0 timestamp: Tue 2010-02-02 22:04:12 +1300 message: Handle DNS header-only packets as invalid. ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20100202090412-afvv2p4oy0x1emf0 # target_branch: http://www.squid-cache.org/bzr/squid3/branches\ # /SQUID_3_0/ # testament_sha1: 82183c6f9f07ad9edbb6676a29371159d093fb93 # timestamp: 2010-02-02 09:46:50 +0000 # source_branch: http://www.squid-cache.org/bzr/squid3/branches\ # /SQUID_3_0 # base_revision_id: squid3@treenet.co.nz-20100202085731-\ # fazi5652unowyjsz # # Begin patch === modified file 'lib/rfc1035.c' --- lib/rfc1035.c 2010-02-02 08:57:31 +0000 +++ lib/rfc1035.c 2010-02-02 09:04:12 +0000 @@ -287,7 +287,10 @@ size_t len; assert(ns > 0); do { - assert((*off) < sz); + if ((*off) >= sz) { + RFC1035_UNPACK_DEBUG; + return 1; + } c = *(buf + (*off)); if (c > 191) { /* blasted compression */