--------------------- PatchSet 11805 Date: 2007/12/21 09:56:53 Author: adrian Branch: SQUID_2_6 Tag: (none) Log: Bug #2156: Fix bug in header array compression (SQUID-2007:2) The initial patch for Squid Security Advisory SQUID-2007:2 was partially flawed and could cause assertion failed errors. Members: src/HttpHeader.c:1.91.2.3->1.91.2.4 Index: squid/src/HttpHeader.c =================================================================== RCS file: /cvsroot/squid/squid/src/HttpHeader.c,v retrieving revision 1.91.2.3 retrieving revision 1.91.2.4 diff -u -r1.91.2.3 -r1.91.2.4 --- squid/src/HttpHeader.c 26 Nov 2007 11:06:13 -0000 1.91.2.3 +++ squid/src/HttpHeader.c 21 Dec 2007 09:56:53 -0000 1.91.2.4 @@ -1,6 +1,6 @@ /* - * $Id: HttpHeader.c,v 1.91.2.3 2007/11/26 11:06:13 adrian Exp $ + * $Id: HttpHeader.c,v 1.91.2.4 2007/12/21 09:56:53 adrian Exp $ * * DEBUG: section 55 HTTP Header * AUTHOR: Alex Rousskov @@ -391,7 +391,8 @@ pos = 0; while (dp < hdr->entries.count) { for (; dp < hdr->entries.count && hdr->entries.items[dp] == NULL; dp++); - assert(dp < hdr->entries.count); + if (dp >= hdr->entries.count) + break; hdr->entries.items[pos] = hdr->entries.items[dp]; if (dp != pos) hdr->entries.items[dp] = NULL;