mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 15:48:36 +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>
(cherry picked from commit 788c106ea1)
This commit is contained in:
parent
cb69a13079
commit
5ce799b576
2 changed files with 2 additions and 2 deletions
|
|
@ -894,7 +894,7 @@
|
|||
"description": "wgl: Initialize DEVMODE struct",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -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