Artifacts Associated With Ticket 584051ffffffffffffffffffffffffffffffffff
Ticket change [0bc39e7ba9] (rid 114048) by dgp on 2002-07-19 22:24:01:
- assignee initialized to: "msofer"
- cmimetype initialized to: "text/plain"
- comment initialized to:
In the tcltest executable, try: testparsevarname {$a(f_} 4 0 This should try to parse the first 4 characters of the string as a variable name. It should return an error message "missing )" because the first 4 characters so not spell out a legal variable name. However, unless the caller has replaced _ with \0, Tcl_ParseVarName is quite happy to go marching through memory looking for that close paren. - foundin initialized to: "obsolete: 8.4b2"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "dgp"
- subsystem initialized to: "45. Parsing and Eval"
- title initialized to: "Tcl_ParseVarName ignores length"
- type initialized to: "Bug"
Ticket change [07d1fb9617] (rid 89470) by dgp on 2002-07-20 05:43:57:
- icomment:
Logged In: YES user_id=80530 Tcl_ParseQuotedString has a similar problem, although there's no special command in tcltest for testing it. Imagine there was and try: testparsequotedstring {"a_} 2 0 It will also escape into memory beyond length. These both boil down to an assumption by ParseTokens that *(parsePtr->end) is a NUL byte. Either all callers of ParseTokens need to verify that is true, or ParseTokens should set that up itself, or (yuk!) the terminating NUL requirement would have to be documented and depend on callers to do it. - login: "dgp"
- mimetype: "text/plain"
- title changed to: "Tcl_Parse* ignore length argument"
- username: "dgp"
- icomment:
Ticket change [06d738b747] (rid 89280) by dgp on 2002-07-20 06:16:59:
- assignee changed to: "jenglish"
- icomment:
Logged In: YES user_id=80530 Tcl_ParseBraces has similar trouble. Imagine the test command: testparsebraces "\{a\\\n\t\t foo bar}" 3 0 T_PB should examine the 3 characters { a \ and return the error "missing close-brace". Instead it gets caught up trying to do backslash substitution, and scans all the way to the close-brace. It would keep going through all memory until it found one. Fixes: 1) Document T_PB as requiring NUL-terminated string (YUK!); or 2) Have T_PB set the NUL it needs on entry, and restore on exit; or 3) Have T_PB call a different form of Tcl_UtfBackslash that can properly operate on counted strings. - login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
Ticket change [ad45316b65] (rid 101445) by dgp on 2002-07-24 21:25:36:
- icomment:
Logged In: YES user_id=80530 Adopting Patch 585105 is one way to fix these bugs.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [0fb18534ab] (rid 94838) by dgp on 2002-08-05 10:46:29:
- assignee changed to: "dgp"
- closedate changed to: "2002-08-05T03:46:29"
- closer changed to: "dgp"
- icomment:
Logged In: YES user_id=80530 fixed by acceptance of 585105
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "dgp"