diff options
| author | dgp@users.sourceforge.net <dgp> | 2012-05-21 16:48:39 (GMT) |
|---|---|---|
| committer | dgp@users.sourceforge.net <dgp> | 2012-05-21 16:48:39 (GMT) |
| commit | 9b6312c2861e25e7e519982fbb1d8d5e26753dc0 (patch) | |
| tree | c022ea2ecf0d6c718230934201019c089f7d78c3 /generic/tclPathObj.c | |
| parent | bf22fe16da609e4cc60fd8f5e6624a9dd8058073 (diff) | |
| parent | be3d016f7ee554f33f41c38bc9adb86d09d659db (diff) | |
| download | tcl-9b6312c2861e25e7e519982fbb1d8d5e26753dc0.zip tcl-9b6312c2861e25e7e519982fbb1d8d5e26753dc0.tar.gz tcl-9b6312c2861e25e7e519982fbb1d8d5e26753dc0.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/tclPathObj.c')
| -rw-r--r-- | generic/tclPathObj.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c index b6f3205..cde554c 100644 --- a/generic/tclPathObj.c +++ b/generic/tclPathObj.c @@ -1091,7 +1091,7 @@ Tcl_FSJoinPath( if (length > 0 && ptr[length -1] != '/') { Tcl_AppendToObj(res, &separator, 1); - length++; + Tcl_GetStringFromObj(res, &length); } Tcl_SetObjLength(res, length + (int) strlen(strElt)); |
