diff options
author | dgp <dgp@users.sourceforge.net> | 2011-04-12 20:04:11 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2011-04-12 20:04:11 (GMT) |
commit | ce6fbd8bb9c3fd5c8a26e3bc71ea22d0679fbd91 (patch) | |
tree | 31ff3921f38c2e5d92fec768e544fc37c2ab5333 /generic/tclStringObj.c | |
parent | ece1a296ac6b776cdb2738eb4ebaa82b984e9ce1 (diff) | |
download | tcl-ce6fbd8bb9c3fd5c8a26e3bc71ea22d0679fbd91.zip tcl-ce6fbd8bb9c3fd5c8a26e3bc71ea22d0679fbd91.tar.gz tcl-ce6fbd8bb9c3fd5c8a26e3bc71ea22d0679fbd91.tar.bz2 |
Repair corruption in [string reverse] when string rep invalidation failed
to also reset the bytes allocated for string rep to zero [Bug 3285472].
Diffstat (limited to 'generic/tclStringObj.c')
-rw-r--r-- | generic/tclStringObj.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 7437ee4..17bed1b 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -2758,6 +2758,7 @@ TclStringObjReverse( source[i++] = tmp; } Tcl_InvalidateStringRep(objPtr); + stringPtr->allocated = 0; return objPtr; } |