summaryrefslogtreecommitdiffstats
path: root/generic/tclStringObj.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2009-04-15 19:07:04 (GMT)
committerdgp <dgp@users.sourceforge.net>2009-04-15 19:07:04 (GMT)
commit60b5eb97ef9fed7fd9b37530945463ff6ba2df13 (patch)
treebe17f1afccd9825febecdd2216f6c47b60ce5012 /generic/tclStringObj.c
parenta882e15e3436ab6a8932cefa08f2c0c2eac2ac2c (diff)
downloadtcl-60b5eb97ef9fed7fd9b37530945463ff6ba2df13.zip
tcl-60b5eb97ef9fed7fd9b37530945463ff6ba2df13.tar.gz
tcl-60b5eb97ef9fed7fd9b37530945463ff6ba2df13.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 dc36242..a0992aa 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.70.2.11 2009/04/10 22:14:29 patthoyts Exp $ */
+ * RCS: @(#) $Id: tclStringObj.c,v 1.70.2.12 2009/04/15 19:07:04 dgp Exp $ */
#include "tclInt.h"
#include "tommath.h"
@@ -1410,6 +1410,7 @@ AppendUnicodeToUnicodeRep(
appendNumChars * sizeof(Tcl_UniChar));
stringPtr->unicode[numChars] = 0;
stringPtr->numChars = numChars;
+ stringPtr->allocated = 0;
Tcl_InvalidateStringRep(objPtr);
}