diff options
author | dgp <dgp@users.sourceforge.net> | 2012-05-21 16:56:27 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2012-05-21 16:56:27 (GMT) |
commit | bc30387f724f38297d65a0ae87c11341b809b8f0 (patch) | |
tree | f30c1902d727ee732c8814a1aa59eeae6b54a80b /generic/tclFileName.c | |
parent | c165b1b8ae2365a2afce837baf0ca643a80fe9c2 (diff) | |
parent | a6a7e5ca7699ad328ed645c207aaba8b69e32a53 (diff) | |
download | tcl-bc30387f724f38297d65a0ae87c11341b809b8f0.zip tcl-bc30387f724f38297d65a0ae87c11341b809b8f0.tar.gz tcl-bc30387f724f38297d65a0ae87c11341b809b8f0.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.
Diffstat (limited to 'generic/tclFileName.c')
-rw-r--r-- | generic/tclFileName.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclFileName.c b/generic/tclFileName.c index 5048308..b130169 100644 --- a/generic/tclFileName.c +++ b/generic/tclFileName.c @@ -863,7 +863,7 @@ TclpNativeJoinPath( if (length > 0 && (start[length-1] != '/')) { Tcl_AppendToObj(prefix, "/", 1); - length++; + Tcl_GetStringFromObj(prefix, &length); } needsSep = 0; @@ -899,7 +899,7 @@ TclpNativeJoinPath( if ((length > 0) && (start[length-1] != '/') && (start[length-1] != ':')) { Tcl_AppendToObj(prefix, "/", 1); - length++; + Tcl_GetStringFromObj(prefix, &length); } needsSep = 0; |