summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2011-04-12 20:04:11 (GMT)
committerdgp <dgp@users.sourceforge.net>2011-04-12 20:04:11 (GMT)
commit37b1332c5e9a5098b66e6775c9073680f9cf94fa (patch)
tree31ff3921f38c2e5d92fec768e544fc37c2ab5333 /generic
parent1eb966fd80e4ebb3ff65e00e5f23a682790ab385 (diff)
downloadtcl-37b1332c5e9a5098b66e6775c9073680f9cf94fa.zip
tcl-37b1332c5e9a5098b66e6775c9073680f9cf94fa.tar.gz
tcl-37b1332c5e9a5098b66e6775c9073680f9cf94fa.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')
-rw-r--r--generic/tclStringObj.c1
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;
}