EnumDisplaySettings() on Wine does not write beyond the end of DEVMODE because it doesn't use dmDriverExtra currently, but this implementation detail should not be relied on.
Signed-off-by: Zhiyi Zhang zzhang@codeweavers.com --- dlls/winemac.drv/display.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/dlls/winemac.drv/display.c b/dlls/winemac.drv/display.c index 522ff57d7a7..9a80308e896 100644 --- a/dlls/winemac.drv/display.c +++ b/dlls/winemac.drv/display.c @@ -847,6 +847,7 @@ LONG CDECL macdrv_ChangeDisplaySettingsEx(LPCWSTR devname, LPDEVMODEW devmode,
if (!devname && !devmode) { + memset(&default_mode, 0, sizeof(default_mode)); default_mode.dmSize = sizeof(default_mode); if (!EnumDisplaySettingsExW(primary_adapter, ENUM_REGISTRY_SETTINGS, &default_mode, 0)) {