Artifacts Associated With Ticket 218455
Ticket change [90046925fc] (rid 120369) by nobody on 2000-10-26 01:00:36:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- 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.
- foundin initialized to: "obsolete: 8.1a2"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "69. Other"
- title initialized to: "Patch for short array in GetPermissionsAttribute"
- type initialized to: "Bug"
Ticket change [c7b1f91843] (rid 121981) by welch on 2000-10-26 08:22:16:
- closedate changed to: "2000-10-26T01:22:16"
- closer changed to: "welch"
- priority changed to: "2"
- resolution changed to: "Fixed"
- status changed to: "Closed"
Ticket change [dc47b3821e] (rid 114450) by dgp on 2001-04-17 04:23:05:
- closedate changed to: "2001-04-16T21:23:05"
- closer changed to: "dgp"
- subsystem changed to: "37. File System"