diff options
author | dgp <dgp@users.sourceforge.net> | 2012-05-21 16:17:11 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2012-05-21 16:17:11 (GMT) |
commit | a89ca11a44b7af7cb1017a6cbaf59f53c3e16ed7 (patch) | |
tree | 666912b90f513715a922d466b249751d4edcf6fa /generic/tclFileName.c | |
parent | 03716dfee8f0f0df26a8c56e6a2b3ceeb9319dbc (diff) | |
download | tcl-a89ca11a44b7af7cb1017a6cbaf59f53c3e16ed7.zip tcl-a89ca11a44b7af7cb1017a6cbaf59f53c3e16ed7.tar.gz tcl-a89ca11a44b7af7cb1017a6cbaf59f53c3e16ed7.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 761c8be..c5ecf0f 100644 --- a/generic/tclFileName.c +++ b/generic/tclFileName.c @@ -1155,7 +1155,7 @@ TclpNativeJoinPath(prefix, joining) if (length > 0 && (start[length-1] != '/')) { Tcl_AppendToObj(prefix, "/", 1); - length++; + Tcl_GetStringFromObj(prefix, &length); } needsSep = 0; @@ -1194,7 +1194,7 @@ TclpNativeJoinPath(prefix, joining) if ((length > 0) && (start[length-1] != '/') && (start[length-1] != ':')) { Tcl_AppendToObj(prefix, "/", 1); - length++; + Tcl_GetStringFromObj(prefix, &length); } needsSep = 0; |