mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-15 17:48:22 +02:00
wgl: Initialize DEVMODE struct
Otherwise the dmDriverExtra field might be uninitialized and have a nonzero value, which can cause the API implementation to smash the stack when copying to the output struct. Cc: mesa-stable Reviewed-by: Joshua Ashton <joshua@froggi.es> Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27998>
This commit is contained in:
parent
d1cf01dc52
commit
788c106ea1
1 changed files with 1 additions and 1 deletions
|
|
@ -74,7 +74,7 @@ static int
|
|||
get_refresh_rate(void)
|
||||
{
|
||||
#ifndef _GAMING_XBOX
|
||||
DEVMODE devModes;
|
||||
DEVMODE devModes = { .dmSize = sizeof(DEVMODE) };
|
||||
|
||||
if (EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &devModes)) {
|
||||
/* clamp the value, just in case we get garbage */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue