Commit 6185252b authored by Zhiyi Zhang's avatar Zhiyi Zhang Committed by Alexandre Julliard

winemac.drv: Zero initialize DEVMODE before passing it to EnumDisplaySettings().

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: 's avatarZhiyi Zhang <zzhang@codeweavers.com> Signed-off-by: 's avatarKen Thomases <ken@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 440fab38
......@@ -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))
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment