Overview
| Artifact ID: | b807bc6f0b4f4d7cebf083001e504d7f858311c9 |
|---|---|
| Ticket: | 220996ffffffffffffffffffffffffffffffffff
'string index' doesn't do bounds checking |
| User & Date: | nobody on 2000-11-01 14:51:16 |
Changes
- assignee changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
'string index' has a bug. If you give an index value that's larger than the length of the string, or less than 0, it doesn't do bounds checking. If you look around line 1210 of tclCmdMZ.c in tcl 8.3.2, you'll see a reference to string[index] but there was no check to verify that 'index' is within the string array bound. I suggest that this: Tcl_SetByteArrayObj(resultPtr, (unsigned char *)(&string1[index]), 1) be replaced with this: if ((index >= 0) && (index < length1)) { Tcl_SetByteArrayObj(resultPtr, (unsigned char *)(&string1[index]), 1); } - foundin changed to: ""
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "nobody"
- subsystem changed to: ""
- title changed to: "'string index' doesn't do bounds checking"
- type changed to: "Bug"