--------------------- PatchSet 11667 Date: 2007/09/17 20:22:36 Author: hno Branch: HEAD Tag: (none) Log: MFC: Bug #2086: Fix a compile-time memory corruption error causing cf_gen to fail The change to include dependency tracking had a small memory allocation error resulting in memory corruption, causing cf_gen to fail during the compile on some platforms/compilers. Members: src/cf_gen.c:1.52->1.53 Index: squid/src/cf_gen.c =================================================================== RCS file: /cvsroot/squid/squid/src/cf_gen.c,v retrieving revision 1.52 retrieving revision 1.53 diff -u -r1.52 -r1.53 --- squid/src/cf_gen.c 6 Sep 2007 09:33:36 -0000 1.52 +++ squid/src/cf_gen.c 17 Sep 2007 20:22:36 -0000 1.53 @@ -1,6 +1,6 @@ /* - * $Id: cf_gen.c,v 1.52 2007/09/06 09:33:36 serassio Exp $ + * $Id: cf_gen.c,v 1.53 2007/09/17 20:22:36 hno Exp $ * * DEBUG: none Generate squid.conf.default and cf_parser.h * AUTHOR: Max Okumoto @@ -183,7 +183,7 @@ t = (Type *) xcalloc(1, sizeof(*t)); t->name = xstrdup(type); while ((dep = strtok(NULL, WS)) != NULL) { - TypeDep *d = (TypeDep *) xcalloc(1, sizeof(*dep)); + TypeDep *d = (TypeDep *) xcalloc(1, sizeof(*d)); d->name = xstrdup(dep); d->next = t->depend; t->depend = d;