Skip to content
Tcl Source Code History Of Ticket 218455ffffffffff
Login

History Of Ticket 218455ffffffffff

Artifacts Associated With Ticket 218455ffffffffff

  1. Ticket change [90046925fc] (rid 120369) by nobody on 2000-10-26 01:00:36:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      OriginalBugID: 584 Bug
      Version: 8.1a2
      SubmitDate: '1998-05-21'
      LastModified: '1998-12-08'
      Severity: SER
      Status: Released
      Submitter: hershey
      ChangedBy: stanton
      OS: All
      OSVersion: NA
      Machine: NA
      FixedDate: '1998-12-08'
      FixedInVersion: 8.1b1
      ClosedDate: '2000-10-25'
      
      
      In Tcl8.1a2, the function GetPermissionsAttribute in
      
      unix/tclUnixFCmd.c declares the array returnString to be 6 characters.
      
      It then writes into it using sprintf with a format string of "%0#5lo".
      
      This format string will print at least one `0' because of the #,
      
      followed by up to 5 characters.  This can mean returning a string with
      
      six characters, overflowing the declared size of the array.
      
      
      I have appended the obvious patch.
      
      
      Incidentally, the comment above this function refers to the group
      
      attribute of the file, probably a bad copy from GetGroupAttribute.
      
      
      Ian Taylor
      
      [email protected]
      
      
      *** tclUnixFCmd.c.~1~   Fri Apr 10 17:14:19 1998
      
      --- tclUnixFCmd.c       Fri Apr 10 17:14:37 1998
      
      *************** GetPermissionsAttribute(interp, objIndex
      
      *** 1168,1174 ****
      
            Tcl_Obj **attributePtrPtr;            /* A pointer to return the object with. */
      
        {
      
            struct stat statBuf;
      
      !     char returnString[6];
      
            Tcl_DString ds;
      
            CONST char *native;
      
            int result;
      
      --- 1168,1174 ----
      
            Tcl_Obj **attributePtrPtr;            /* A pointer to return the object with. */
      
        {
      
            struct stat statBuf;
      
      !     char returnString[7];
      
            Tcl_DString ds;
      
            CONST char *native;
      
            int result;
      
      
      
      
      12/08/1998 13:24 - stanton - This patch was applied 11/30/98.
      
    4. foundin initialized to: "obsolete: 8.1a2"
    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: "69. Other"
    10. title initialized to: "Patch for short array in GetPermissionsAttribute"
    11. type initialized to: "Bug"
  2. Ticket change [c7b1f91843] (rid 121981) by welch on 2000-10-26 08:22:16:

    1. closedate changed to: "2000-10-26T01:22:16"
    2. closer changed to: "welch"
    3. priority changed to: "2"
    4. resolution changed to: "Fixed"
    5. status changed to: "Closed"
  3. Ticket change [dc47b3821e] (rid 114450) by dgp on 2001-04-17 04:23:05:

    1. closedate changed to: "2001-04-16T21:23:05"
    2. closer changed to: "dgp"
    3. subsystem changed to: "37. File System"