Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 9c26d88e763aea4ae9e644bef813888990e86cc5
Ticket: c383ebb5e414458cd386e6016e59f693e3840e81
"glob -path a" core dumps instead of argument error
User & Date: dah on 2016-06-13 18:27:30
Changes

  1. icomment:
    I can't create a patch atm but here's a naive solution:
    
    In file tclFileName.c @ line 1569
    
      skipTypes:
        /*
         * Now we perform the actual glob below. This may involve joining together
         * the pattern arguments, dealing with particular file types etc. We use a
         * 'goto' to ensure we free any memory allocated along the way.
         */
    
        objc -= i;
        /* Fix crash due to not checking if glob pattern exists */
        if (objc == 0) {
            Tcl_SetObjResult(interp, Tcl_NewStringObj("missing glob pattern", -1));
    	result = TCL_ERROR;
    	Tcl_SetErrorCode(interp, "TCL", "ARGUMENT", "BAD", NULL);
    	join = 0;
    	goto endOfGlob;
        }
        objv += i;
        result = TCL_OK;
    
  2. login: "dah"
  3. mimetype: "text/plain"
  4. username: "dah"