diff options
author | dgp <dgp@users.sourceforge.net> | 2012-05-21 16:48:39 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2012-05-21 16:48:39 (GMT) |
commit | a6a7e5ca7699ad328ed645c207aaba8b69e32a53 (patch) | |
tree | c022ea2ecf0d6c718230934201019c089f7d78c3 /generic/tclFileName.c | |
parent | 70e6283bef9733ca12935627fda82f732e5cabd9 (diff) | |
parent | a89ca11a44b7af7cb1017a6cbaf59f53c3e16ed7 (diff) | |
download | tcl-a6a7e5ca7699ad328ed645c207aaba8b69e32a53.zip tcl-a6a7e5ca7699ad328ed645c207aaba8b69e32a53.tar.gz tcl-a6a7e5ca7699ad328ed645c207aaba8b69e32a53.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 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; |