Skip to content
Tcl Source Code History Of Ticket 1352409
Login

History Of Ticket 1352409

Artifacts Associated With Ticket 1352409

  1. Ticket change [e42a3c49c6] (rid 87911) by nobody on 2005-11-09 17:49:22:

    1. assignee initialized to: "andreas_kupries"
    2. cmimetype initialized to: "text/plain"
    3. 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.
      
    4. foundin initialized to: "None"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "nobody"
    9. subsystem initialized to: "24. Channel Commands"
    10. title initialized to: ""exec cat foo > ~unknown_user" == crash"
    11. type initialized to: "Bug"
  2. Ticket change [ca3f56050f] (rid 122429) by nobody on 2005-11-10 17:10:17:

    1. 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
      %
      
      
    2. login: "nobody"
    3. mimetype: "text/plain"
    4. username: "nobody"
  3. Ticket change [5d9ff30db7] (rid 115501) by nobody on 2005-11-29 17:44:52:

    1. 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.
      
      
    2. login: "nobody"
    3. mimetype: "text/plain"
    4. username: "nobody"
  4. Ticket change [61a278944c] (rid 92276) by nobody on 2006-02-07 19:23:12:

    1. 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.
      
      
      
    2. login: "nobody"
    3. mimetype: "text/plain"
    4. username: "nobody"
  5. Ticket change [aee48c0bcd] (rid 97718) by hobbs on 2006-02-08 01:23:25:

    1. closedate changed to: "2006-02-07T18:23:25"
    2. closer changed to: "hobbs"
    3. resolution changed to: "Fixed"
    4. status changed to: "Closed"