--------------------- PatchSet 10243 Date: 2007/12/14 07:36:15 Author: adri Branch: s27_adri Tag: (none) Log: Allow null strings to be stringDup()'ed to other null strings. Members: libbuf/String.c:1.1.2.8->1.1.2.9 Index: squid/libbuf/String.c =================================================================== RCS file: /cvsroot/squid-sf//squid/libbuf/Attic/String.c,v retrieving revision 1.1.2.8 retrieving revision 1.1.2.9 diff -u -r1.1.2.8 -r1.1.2.9 --- squid/libbuf/String.c 13 Dec 2007 12:18:22 -0000 1.1.2.8 +++ squid/libbuf/String.c 14 Dec 2007 07:36:15 -0000 1.1.2.9 @@ -1,6 +1,6 @@ /* - * $Id: String.c,v 1.1.2.8 2007/12/13 12:18:22 adri Exp $ + * $Id: String.c,v 1.1.2.9 2007/12/14 07:36:15 adri Exp $ * * DEBUG: section 67 String * AUTHOR: Duane Wessels @@ -98,6 +98,8 @@ String dup = StringNull; assert(s); stringStats.dup++; + if (strIsNull(*s)) + return StringNull; dup.len = s->len; dup.nb = buf_ref(s->nb); return dup;