int overflow in Tcl_ListObjReplace
Closed / Fixed2971669fffffffffffffffffffffffffffffffffCreated 17 years agoUpdated 17 years ago
Descriptionplain2010-03-17 00:47:33
tclListObj.c, line 835:
} else if (numElems < first+count) {
what if "first+count" overflows the int range?
kennykbplain2010-03-18 01:23:00
File Added - 367146: 2971669.patch
kennykbplain2010-03-18 01:23:22
Patch attached for the submitter's review.
kennykb Ticket [2971669fff]: 1 change
[History diff]2010-03-18 01:23:23
ferrieuxplain2010-03-18 03:55:36
A few lines after the fix there's numRequired = numElems - count + objc; which can overflow again; not sure we don't end up with a negative third argument to memmove a few lines down from there. </paranoid>
dgpplain2010-03-19 03:35:08
eviewed and committed to HEAD.
dgpplain2010-03-19 03:39:04
allow_comments - 1 and backported for 8.5.9.
Log in (anonymous is fine) to add a comment.
Attachments:
- 2971669.patch [download] added by kennykb on 2010-03-18 01:23:00. [details]