Overview
| Artifact ID: | 7ae66c32585725749f13c7d6ca32f56ee093824270e442e17d4b384d37cf7261 |
|---|---|
| Ticket: | e87000d8425ab86af682dd8195b9d20826974ba8
crash for "fconfigure stdout" in Win32 |
| User & Date: | chw on 2020-08-11 11:41:36 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
When doing a "fconfigure stdout" or "chan configure stdout" on Win32 console channels, an immediate crash can happen. A potential fix is: ---8><------8><------8><------8><------8><------8><------8><------ Index: win/tclWinConsole.c ================================================================== --- win/tclWinConsole.c +++ win/tclWinConsole.c @@ -1637,19 +1637,23 @@ } if (valid) { return TCL_OK; } - if (infoPtr->flags & CONSOLE_READ_OPS) { - return Tcl_BadChannelOption(interp, optionName, "inputmode winsize"); - } else { - return Tcl_BadChannelOption(interp, optionName, ""); + if (len > 0) { + const char *optionList = ""; + + if (infoPtr->flags & CONSOLE_READ_OPS) { + optionList = "inputmode winsize"; + } + return Tcl_BadChannelOption(interp, optionName, optionList); } + return TCL_OK; } ^L /* * Local Variables: * mode: c * c-basic-offset: 4 * fill-column: 78 * End: */ ---8><------8><------8><------8><------8><------8><------8><------ - foundin changed to: "core-8-branch, current"
- is_private changed to: "0"
- login: "chw"
- priority changed to: "5 Medium"
- private_contact changed to: "0b3aff16612e1e9f3b675963fa64e01bd1d89307"
- resolution changed to: "None"
- severity changed to: "Critical"
- status changed to: "Open"
- submitter changed to: "chw"
- subsystem changed to: "25. Channel System"
- title changed to: "crash for "fconfigure stdout" in Win32"
- type changed to: "Bug"