Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2005-06-23
04:23 • Closed ticket [1225571fff]: Stack overrun in Win32 TclpFilesystemPathType pl... artifact: 5542fddc0b user: dgp
2005-06-22
22:55 • Ticket [1225571fff]: 4 changes artifact: 1a2d9ec3ff user: dgp
21:25 • Ticket [1225571fff]: 4 changes artifact: c4599712ff user: patthoyts
21:25 • Add attachment tclWinFile.c.patch to ticket [1225571fffffffff|1225571ff... artifact: 4784a29ad6 user: patthoyts
14:25 • New ticket [1225571fff] Stack overrun in Win32 TclpFilesystemPathType. artifact: 2c52ee5026 user: patthoyts

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: