--------------------- PatchSet 10373 Date: 2008/01/06 09:38:47 Author: adri Branch: s27_adri Tag: (none) Log: Add checking. Members: libbuf/String.c:1.1.2.19->1.1.2.20 Index: squid/libbuf/String.c =================================================================== RCS file: /cvsroot/squid-sf//squid/libbuf/Attic/String.c,v retrieving revision 1.1.2.19 retrieving revision 1.1.2.20 diff -u -r1.1.2.19 -r1.1.2.20 --- squid/libbuf/String.c 6 Jan 2008 09:38:07 -0000 1.1.2.19 +++ squid/libbuf/String.c 6 Jan 2008 09:38:47 -0000 1.1.2.20 @@ -1,6 +1,6 @@ /* - * $Id: String.c,v 1.1.2.19 2008/01/06 09:38:07 adri Exp $ + * $Id: String.c,v 1.1.2.20 2008/01/06 09:38:47 adri Exp $ * * DEBUG: section 67 String * AUTHOR: Duane Wessels @@ -232,7 +232,7 @@ String n; /* XXX for now just copy; we'll make this reference the buffer + offset later! */ - /* XXX no error checking! */ + assert(start + len <= buf_len(b)); stringLimitInit(&n, buf_buf(b) + start, len); return n; }