Artifacts Associated With Ticket 218964
Ticket change [fe738d7cd8] (rid 108590) by nobody on 2000-10-26 01:08:41:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
OriginalBugID: 3336 Bug Version: 8.2.1 SubmitDate: '1999-11-05' LastModified: '1999-12-04' Severity: CRIT Status: Released Submitter: techsupp ChangedBy: hobbs OS: Linux OSVersion: Debian (Potato) FixedDate: '1999-12-04' FixedInVersion: 8.2.3 ClosedDate: '2000-10-25' Name: Patrick Earl Comments: This bug affects no less than 8.0.5, 8.2.0, and 8.2.1, probably the entire 8.x series. I did not search for other occurences of the same type of bug, where Tcl_UtfBackslash was called during the parsing of a counted string. Considering it can be remotely activated depending on the application, it is an important situation to check for. If you would like, I would be willing to look over the rest of the Tcl code for the same situation, although since my knowledge of the Tcl codebase is limited, there may be people more appropriate for that job. ReproducibleScript: Called Tcl_ScanCountedElement with a hex sequence as the last portion of the string. The string was not null terminated. ObservedBehavior: Tcl crashed and burned. In Tcl_ScanCountedElement it called Tcl_UtfBackslash which parsed the backslash sequence without any regaurd to where Tcl_ScanCountedElement knows the string ends. Tcl_ScanCountedElement's loop checks for a != end condition, so if the end of your string happened to be \x01 and the next character in memory was a C, Tcl_UtfBackslash would parse it as \x01C and Tcl_ScanCountedElement would be messed up. DesiredBehavior: The loop should check for < instead of !=. Either that, or there could be an if statement after the Tcl_UtfBackslash statement checking to see if it went over, and rectifying the situation if it did. Patch: *** tclUtil.c Fri May 21 19:20:13 1999 --- tclUtil.c.new Tue Oct 5 19:59:20 1999 *************** *** 581,587 **** if ((p == lastChar) || (*p == '{') || (*p == '"')) { flags |= USE_BRACES; } ! for ( ; p != lastChar; p++) { switch (*p) { case '{': nestingLevel++; --- 581,587 ---- if ((p == lastChar) || (*p == '{') || (*p == '"')) { flags |= USE_BRACES; } ! for ( ; p < lastChar; p++) { switch (*p) { case '{': nestingLevel++; PatchFiles: tclUtil.c Added to 8.2.3. -- 12/04/1999 hobbs - foundin initialized to: "obsolete: 8.2.1"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "69. Other"
- title initialized to:
Tcl_ScanCountedElement causes sigsegv on input with \x near
- type initialized to: "Bug"
Ticket change [5bbe5f0372] (rid 118385) by welch on 2000-10-26 08:32:16:
- closedate changed to: "2000-10-26T01:32:16"
- closer changed to: "welch"
- priority changed to: "2"
- resolution changed to: "Fixed"
- status changed to: "Closed"
Ticket change [f4b749d647] (rid 129971) by dgp on 2001-04-19 04:16:06:
- closedate changed to: "2001-04-18T21:16:06"
- closer changed to: "dgp"
- subsystem changed to: "10. Objects"