Stack overrun in Win32 TclpFilesystemPathType
Closed / Fixed1225571fffffffffffffffffffffffffffffffffCreated 21 years agoUpdated 21 years ago
Descriptionplain2005-06-22 14:25:29
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.
patthoytsplain2005-06-22 21:25:43
File Added - 139368: tclWinFile.c.patch
dgpplain2005-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?
dgpplain2005-06-23 04:23:36
Logged In: YES user_id=80530 fix committed for 8.4.11 and HEAD.
Log in (anonymous is fine) to add a comment.
Attachments:
- tclWinFile.c.patch [download] added by patthoyts on 2005-06-22 21:25:29. [details]