Ticket UUID: | 1225571 | |||
Title: | Stack overrun in Win32 TclpFilesystemPathType | |||
Type: | Bug | Version: | obsolete: 8.4.11 | |
Submitter: | patthoyts | Created on: | 2005-06-22 14:25:29 | |
Subsystem: | 37. File System | Assigned To: | dgp | |
Priority: | 7 High | Severity: | ||
Status: | Closed | Last Modified: | 2005-06-23 04:23:36 | |
Resolution: | Fixed | Closed By: | dgp | |
Closed on: | 2005-06-22 21:23:36 | |||
Description: |
Running some tcl 8.4.11 tcl tests under BoundsChecker on WinXP I spotted a "Stack memory overrun" in TclpFilesystemPathType(). tclWinFile.c:2101 the volType is declared as char[] and VOL_BUF_SIZE is set to 32 but this value in the size in TCHARs so when we use the GetVolumeInformationW API our buffer is in fact half the size it should be. The following patch eliminates the warning from BoundsChecker by forcing the buffer to be WCHAR and therefore big enough. | |||
User Comments: |
dgp added on 2005-06-23 04:23:36:
Logged In: YES user_id=80530 fix committed for 8.4.11 and HEAD. dgp added on 2005-06-22 22:55:05: Logged In: YES user_id=80530 Patch replaces an array of 32 chars with an array of 64 WCHARs. Is that correct? patthoyts added on 2005-06-22 21:25:43: File Added - 139368: tclWinFile.c.patch |
Attachments:
- tclWinFile.c.patch [download] added by patthoyts on 2005-06-22 21:25:29. [details]