--------------------- PatchSet 10282 Date: 2007/12/19 16:14:31 Author: adri Branch: s27_adri Tag: (none) Log: use valgrind to find and identify some messed up array checks. Members: libhttp/HttpStrList.c:1.1.2.1->1.1.2.2 test-suite/check_strlist.c:1.1.2.1->1.1.2.2 Index: squid/libhttp/HttpStrList.c =================================================================== RCS file: /cvsroot/squid-sf//squid/libhttp/Attic/HttpStrList.c,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -r1.1.2.1 -r1.1.2.2 --- squid/libhttp/HttpStrList.c 17 Dec 2007 08:17:47 -0000 1.1.2.1 +++ squid/libhttp/HttpStrList.c 19 Dec 2007 16:14:31 -0000 1.1.2.2 @@ -1,6 +1,6 @@ /* - * $Id: HttpStrList.c,v 1.1.2.1 2007/12/17 08:17:47 adri Exp $ + * $Id: HttpStrList.c,v 1.1.2.2 2007/12/19 16:14:31 adri Exp $ * * DEBUG: section 66 HTTP Header Tools * AUTHOR: Alex Rousskov @@ -169,7 +169,7 @@ len = *ipos - ii; /* *pos points to del or '\0' */ /* rtrim */ - while (len > 0 && xisspace(strGetPos(*str, *ipos + len))) + while (len > 0 && xisspace(strGetPos(*str, len))) len--; if (ilen) *ilen = len; Index: squid/test-suite/check_strlist.c =================================================================== RCS file: /cvsroot/squid-sf//squid/test-suite/Attic/check_strlist.c,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -r1.1.2.1 -r1.1.2.2 --- squid/test-suite/check_strlist.c 17 Dec 2007 08:17:51 -0000 1.1.2.1 +++ squid/test-suite/check_strlist.c 19 Dec 2007 16:14:32 -0000 1.1.2.2 @@ -43,6 +43,7 @@ strlist_add(&s, "\"c,f\"", ','); strlist_add(&s, "d", ','); strlist_add(&s, "e", ','); + stringAppend(&s, "\r\n", 2); printf("List: '%.*s'\n", strLen2(s), strBuf2(s));