Overview
| Artifact ID: | d176af2a49b74406d93b27219ad2e813debcf594 |
|---|---|
| Ticket: | 218453ffffffffffffffffffffffffffffffffff
Patch for missing error check in TclGetDefaultStdChannel on |
| User & Date: | nobody on 2000-10-26 01:00:34 |
Changes
- assignee changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
OriginalBugID: 581 Bug Version: 8.1a2 SubmitDate: '1998-05-21' LastModified: '1998-11-19' Severity: SER Status: Released Submitter: hershey ChangedBy: rjohnson OS: All OSVersion: NA Machine: NA FixedDate: '1998-11-19' FixedInVersion: 8.0.5 ClosedDate: '2000-10-25' In Tcl 8.1a2, on Windows, the function TclGetDefaultStdChannel, in win/tclWinChan.c, does not check the return value of Tcl_MakeFileChannel before passing it to Tcl_SetChannelOption. However, it is possible, if somewhat unlikely, for Tcl_MakeFileChannel to fail, when there is some confusion over handles and the mode in which they were opened. It is better to return an indication of failure than to get a segmentation violation. I have appended the obvious patch. Ian Taylor [email protected] *** tclWinChan.c.~1~ Fri Apr 10 17:47:12 1998 --- tclWinChan.c Fri Apr 10 17:47:17 1998 *************** TclpGetDefaultStdChannel(type) *** 1180,1185 **** --- 1180,1188 ---- } channel = Tcl_MakeFileChannel(handle, mode); + if (channel == NULL) { + return NULL; + } /* * Set up the normal channel options for stdio handles. This bug also appeared in Tcl 8.0. I fixed it in version 8.0.5. The change will propagate up to 8.1. - Ray
- foundin changed to: "obsolete: 8.1a2"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "nobody"
- subsystem changed to: "69. Other"
- title changed to:
Patch for missing error check in TclGetDefaultStdChannel on
- type changed to: "Bug"