summaryrefslogtreecommitdiffstats
path: root/generic/tclFileName.c
diff options
context:
space:
mode:
authordgp <dgp@noemail.net>2012-05-21 16:48:39 (GMT)
committerdgp <dgp@noemail.net>2012-05-21 16:48:39 (GMT)
commitb2ad576a82e12eb835146d7feb6ab21f1383d1f5 (patch)
treec022ea2ecf0d6c718230934201019c089f7d78c3 /generic/tclFileName.c
parent40f8d0256fa8c3e89979d0bd67405b1fbb6e69e1 (diff)
parentdf392b7766740ae63150775c077a222afc18a07f (diff)
downloadtcl-b2ad576a82e12eb835146d7feb6ab21f1383d1f5.zip
tcl-b2ad576a82e12eb835146d7feb6ab21f1383d1f5.tar.gz
tcl-b2ad576a82e12eb835146d7feb6ab21f1383d1f5.tar.bz2
When using Tcl_SetObjLength() calls to grow and shrink the objPtr->bytes buffer,
care must be taken that the value cannot possibly become pure Unicode. Calling Tcl_AppendToObj() has the possibility of making such a conversion. Bug found while valgrinding the trunk. FossilOrigin-Name: 28e43f3b9cdf9f73d13066022ab7380487210a81
Diffstat (limited to 'generic/tclFileName.c')
-rw-r--r--generic/tclFileName.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclFileName.c b/generic/tclFileName.c
index 1fca08b..4c57256 100644
--- a/generic/tclFileName.c
+++ b/generic/tclFileName.c
@@ -857,7 +857,7 @@ TclpNativeJoinPath(
if (length > 0 && (start[length-1] != '/')) {
Tcl_AppendToObj(prefix, "/", 1);
- length++;
+ Tcl_GetStringFromObj(prefix, &length);
}
needsSep = 0;
@@ -893,7 +893,7 @@ TclpNativeJoinPath(
if ((length > 0) &&
(start[length-1] != '/') && (start[length-1] != ':')) {
Tcl_AppendToObj(prefix, "/", 1);
- length++;
+ Tcl_GetStringFromObj(prefix, &length);
}
needsSep = 0;