Artifacts Associated With Ticket 1352409fffffffff
Ticket change [e42a3c49c6] (rid 87911) by nobody on 2005-11-09 17:49:22:
- assignee initialized to: "andreas_kupries"
- cmimetype initialized to: "text/plain"
- comment initialized to:
You can trigger a crash by: exec cat foo > ~unknown_user The problem is a Tcl_DStringFree on an unallocated Tcl_DString in FileForRedirect in tclPipe.c. The Tcl_DStringFree then tries to ckfree a garbage value - bang! Something like: --- orig\tclPipe.c 2005-10-28 12:24:40.515898100 +0100 +++ tclPipe.c 2005-11-09 17:42:32.411874900 +0000 @@ -136,10 +136,10 @@ name = Tcl_TranslateFileName(interp, spec, &nameString); if (name != NULL) { file = TclpOpenFile(name, flags); + Tcl_DStringFree(&nameString); } else { file = NULL; } - Tcl_DStringFree(&nameString); if (file == NULL) { Tcl_AppendResult(interp, "couldn't ", ((writing) ? "write" : "read"), " file \"", spec, "\": ", ...should fix it. - foundin initialized to: "None"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "24. Channel Commands"
- title initialized to: ""exec cat foo > ~unknown_user" == crash"
- type initialized to: "Bug"
Ticket change [ca3f56050f] (rid 122429) by nobody on 2005-11-10 17:10:17:
- icomment:
Logged In: NO Also while 8.4 may not have the bug, it still gives a mixed up error message: % info patchlevel 8.4.8 % exec cat foo > ~unknown_user user "unknown_user" doesn't existcouldn't write file "~unknown_user": No error %
- login: "nobody"
- mimetype: "text/plain"
- username: "nobody"
- icomment:
Ticket change [5d9ff30db7] (rid 115501) by nobody on 2005-11-29 17:44:52:
- icomment:
Logged In: NO Also note that if the Tcl_TranslateFileName() fails (returns NULL), then it should have it's own error message as the existing one contains Tcl_PosixError which won't have been set.
- login: "nobody"
- mimetype: "text/plain"
- username: "nobody"
- icomment:
Ticket change [61a278944c] (rid 92276) by nobody on 2006-02-07 19:23:12:
- icomment:
Logged In: NO NB. this is now fixed by v1.17 of tclpipe.c : * generic/tclPipe.c (FileForRedirect): Prevent nameString from being freed without having been initialized.
- login: "nobody"
- mimetype: "text/plain"
- username: "nobody"
- icomment:
Ticket change [aee48c0bcd] (rid 97718) by hobbs on 2006-02-08 01:23:25:
- closedate changed to: "2006-02-07T18:23:25"
- closer changed to: "hobbs"
- resolution changed to: "Fixed"
- status changed to: "Closed"