user32: EnumDisplaySettingsExA: fill in all of lpDevmode->dmDeviceName

Dan Kegel dank at kegel.com
Thu Jun 5 22:14:37 CDT 2008


'Cause if we don't, code that expects it to be defined
is mildly surprised to find that bytes after the string's
terminating nul are undefined.
Fixes 16 Valgrind warnings of the form:

Use of uninitialised value of size 4
   at mbstowcs_sbcs (mbtowc.c:78)
   by wine_cp_mbstowcs (mbtowc.c:266)
   by MultiByteToWideChar (locale.c:1846)
   by GdiConvertToDevmodeW (driver.c:434)
   by ChangeDisplaySettingsExA (sysparams.c:3011)
   by ChangeDisplaySettingsA (sysparams.c:2980)
   by test_ChangeDisplaySettingsEx (monitor.c:161)
 Uninitialised value was created by a stack allocation
   at test_ChangeDisplaySettingsEx (monitor.c:141)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: user32sysparams.patch
Type: text/x-diff
Size: 793 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20080605/34f5c5a0/attachment.patch 


More information about the wine-patches mailing list