Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2009-02-26
22:12 • Ticket [2561267fff] Tcl_SetObjLength can produce invalid strings status stil... artifact: dd58cee1fb user: dkf
2009-02-03
23:25 • Ticket [2561267fff]: 4 changes artifact: e275c216bc user: dgp
16:25 • New ticket [2561267fff]. artifact: 5762e4d8db user: dgp

Tcl_SetObjLength can produce invalid strings

Open2561267fffffffffffffffffffffffffffffffffCreated 18 years agoUpdated 18 years ago
Descriptionplain2009-02-03 16:25:09
When Tcl_SetObjLength() truncates the
bytelength of a value, there are no
checks to verify that the new length
respects the boundaries between legal
multi-byte characters in Tcl's internal
encoding.

This means a truncating T_SOL call can
corrupt the final character of the
truncated value.  Seems like the docs
ought to at least warn callers of this
possibility.
dgpplain2009-02-03 23:25:41
data_type - 110894

oops!  wrong tracker.
dkf Ticket [2561267fff]: 3 changes [History diff]2009-02-26 22:12:07
Log in (anonymous is fine) to add a comment.