From c217dd3622ba6f95f77ca70cc8049c1a7256c58b Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 15 Apr 2009 19:11:07 +0000 Subject: * generic/tclStringObj.c: AppendUnicodeToUnicodeRep failed to set stringPtr->allocated to 0, leading to crashes. --- ChangeLog | 5 +++++ generic/tclStringObj.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 23eb910..23df02f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-04-15 Don Porter + + * generic/tclStringObj.c: AppendUnicodeToUnicodeRep failed + to set stringPtr->allocated to 0, leading to crashes. + 2009-04-14 Stuart Cassoff * unix/tcl.m4: Removed -Wno-implicit-int from CFLAGS_WARNING. diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 14f3bac..aad8881 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.32.2.9 2009/04/07 18:37:42 dgp Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.32.2.10 2009/04/15 19:11:07 dgp Exp $ */ #include "tclInt.h" @@ -1339,6 +1339,7 @@ AppendUnicodeToUnicodeRep(objPtr, unicode, appendNumChars) appendNumChars * sizeof(Tcl_UniChar)); stringPtr->unicode[numChars] = 0; stringPtr->numChars = numChars; + stringPtr->allocated = 0; Tcl_InvalidateStringRep(objPtr); } -- cgit v0.12