------------------------------------------------------------ revno: 11844 revision-id: squid3@treenet.co.nz-20160508124333-3newast2k6d38bv5 parent: squid3@treenet.co.nz-20160506091445-4rpxluz7uy16yjlu fixes bug: http://bugs.squid-cache.org/show_bug.cgi?id=4515 committer: Amos Jeffries branch nick: 3.2 timestamp: Mon 2016-05-09 00:43:33 +1200 message: Bug 4515: regression after CVE-2016-4554 patch ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20160508124333-3newast2k6d38bv5 # target_branch: http://bzr.squid-cache.org/bzr/squid3/branches\ # /SQUID_3_2 # testament_sha1: d4c96585dea9fcdfb10cb15677efd0b6f9248246 # timestamp: 2016-05-08 12:50:37 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/3.2 # base_revision_id: squid3@treenet.co.nz-20160506091445-\ # 4rpxluz7uy16yjlu # # Begin patch === modified file 'src/mime_header.cc' --- src/mime_header.cc 2016-05-02 03:44:32 +0000 +++ src/mime_header.cc 2016-05-08 12:43:33 +0000 @@ -66,10 +66,13 @@ debugs(25, 5, "mime_get_header: looking for '" << name << "'"); - for (p = mime; *p; p += strcspn(p, "\n\r")) { - if (strcmp(p, "\r\n\r\n") == 0 || strcmp(p, "\n\n") == 0) + for (p = mime; *p; p += strcspn(p, "\n")) { + if (strcmp(p, "\n\r\n") == 0 || strcmp(p, "\n\n") == 0) return NULL; + if (*p == '\n') + ++p; + if (strncasecmp(p, name, namelen)) continue;