winecfg: fix drive detection

Michael Jung mjung at
Fri Feb 11 13:37:17 CST 2005

* winecfg's automatic drive detection crashes if the root directory is not 
mapped to a drive letter. This is due to the fact that a NULL pointer value 
is assigned to add_drive's 'serial' parameter which is then given to strlen 
via strdupA.
* winecfg's strdupA doesn't allocate enough heap memory to hold the 
terminating '\0' character.
* Due to a missing break all previously unmapped drive letters are mapped to 
'/', which results in an error message stating that there is no free drive 
letter to map to '/'.

 Fixed automatic drive detection for the case that the root directory is not 
already mapped
Michael Jung
mjung at
-------------- next part --------------
A non-text attachment was scrubbed...
Name: programs_winecfg_drivedetect_c.diff
Type: text/x-diff
Size: 1527 bytes
Desc: not available
Url :

More information about the wine-patches mailing list