--------------------- PatchSet 4623 Date: 2007/05/20 07:45:41 Author: amosjeffries Branch: ayjwork Tag: (none) Log: Harden append case where buffer larger than output string. Members: src/SqString.cc:1.1.2.12->1.1.2.13 Index: squid3/src/SqString.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/SqString.cc,v retrieving revision 1.1.2.12 retrieving revision 1.1.2.13 diff -u -r1.1.2.12 -r1.1.2.13 --- squid3/src/SqString.cc 20 May 2007 07:42:11 -0000 1.1.2.12 +++ squid3/src/SqString.cc 20 May 2007 07:45:41 -0000 1.1.2.13 @@ -1,6 +1,6 @@ /* - * $Id: SqString.cc,v 1.1.2.12 2007/05/20 07:42:11 amosjeffries Exp $ + * $Id: SqString.cc,v 1.1.2.13 2007/05/20 07:45:41 amosjeffries Exp $ * * DEBUG: section 67 String * AUTHOR: Duane Wessels @@ -188,7 +188,7 @@ if(len < 1 || str == NULL) return; - if (len_ + len < size_) { + if ( (len_ + len +1) < size_) { operator[](len_+len) = '\0'; xmemcpy(buf_+len_, str, len); len_ += len;