Tcl_AppendStringsToObj fail on pure unicode
Closed / Fixed2597185fffffffffffffffffffffffffffffffffCreated 18 years agoUpdated 18 years ago
Descriptionplain2009-02-13 20:51:07
Tcl_AppendStringsToObj() uses calls to Tcl_*SetObjLength() to grow the buffer big enough to copy in the strings. However (see 1689385) when these routines are applied to a pure unicode value, it is the Tcl_UniChar array and not the char array of objPtr->bytes that is grown. Looks like T_ASTO will crash hard in this situation.
dgpplain2009-02-18 00:18:10
fixed in HEAD
ferrieuxplain2009-03-20 05:50:26
why is this still open ?
dgpplain2009-03-20 08:05:48
so that I am reminded to backport the fix.
dkf Ticket [2597185fff]: 1 change
[History diff]2009-03-20 17:13:18
dgpplain2009-03-21 00:42:02
Demo: % teststringobj set2 1 [string replace abc 1 1 d] % teststringobj appendstrings 1 foo bar soom /bin/sh: line 2: 23231 Segmentation fault ./tcltest
dgpplain2009-03-21 09:56:29
allow_comments - 1 Test stringObj-6.9 committed to confirm fix on all branches.
Log in (anonymous is fine) to add a comment.