Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 3f9cf8ed517b5fe3499e7b4a66996131b44b92cf
Ticket: 956063ffffffffffffffffffffffffffffffffff
[file dirname] broken
User & Date: dgp on 2004-05-19 03:06:03
Changes

  1. icomment:
    Logged In: YES 
    user_id=80530
    
    
    TclPathPart notices when the
    PATHFLAGS is not 0
    (presumably is TCLPATH_APPENDED)
    and based on that assumes that
    the cwdPtr is the dirname and
    the normPathPtr is the tail.
    
    That would be a safe assumption
    if TclNewFSPathObj forbade
    path separators in its addStrRep
    argument, but it doesn't appear to
    do so.
    
    Since these are internal routines,
    all would also be ok, if simply
    by convention, nothing called
    TclNewFSPathObj with a
    separator in the addStrRep argument.
    However, in this test script, the
    call:
    
    TclNewFSPathObj (dirPtr=0x8071070, addStrRep=0x8081b30
    "foo/bar.tcl",
        len=11) at ../unix/../generic/tclPathObj.c:109
    
    takes place.
    
    I think the proper fix here requires
    a more precise spec. of what
    assumptions different PATHFLAGS
    values impose, and a careful audit
    the the relevant routines preserve
    those specs.
    
    
    
  2. login: "dgp"
  3. mimetype: "text/plain"
  4. username: "dgp"