summaryrefslogtreecommitdiffstats
path: root/generic/tclStringObj.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2009-04-15 19:11:07 (GMT)
committerdgp <dgp@users.sourceforge.net>2009-04-15 19:11:07 (GMT)
commit09ae5cf67030dc3cae909101f445157bdcf6aacd (patch)
treed199bf44c6bd95d9bb0213391614acb585977572 /generic/tclStringObj.c
parentd5c81a66a5d7d79553e87afde83a66325eaf7b6d (diff)
downloadtcl-09ae5cf67030dc3cae909101f445157bdcf6aacd.zip
tcl-09ae5cf67030dc3cae909101f445157bdcf6aacd.tar.gz
tcl-09ae5cf67030dc3cae909101f445157bdcf6aacd.tar.bz2
* generic/tclStringObj.c: AppendUnicodeToUnicodeRep failed
to set stringPtr->allocated to 0, leading to crashes.
Diffstat (limited to 'generic/tclStringObj.c')
-rw-r--r--generic/tclStringObj.c3
1 files changed, 2 insertions, 1 deletions
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);
}