[PATCH 6/6] explorer: Zero initialize DEVMODE before passing it to EnumDisplaySettings().
Zhiyi Zhang
zzhang at codeweavers.com
Tue Aug 11 05:16:33 CDT 2020
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 at codeweavers.com>
---
programs/explorer/desktop.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/programs/explorer/desktop.c b/programs/explorer/desktop.c
index 691db5c8bda..6f1ff54c143 100644
--- a/programs/explorer/desktop.c
+++ b/programs/explorer/desktop.c
@@ -889,6 +889,7 @@ static void initialize_display_settings(void)
/* Store current display mode in the registry */
ddW.cb = sizeof(ddW);
+ memset(&dmW, 0, sizeof(dmW));
dmW.dmSize = sizeof(dmW);
while (EnumDisplayDevicesW( NULL, i++, &ddW, 0 ))
{
--
2.25.1
More information about the wine-devel
mailing list