diff options
author | Volker RĂ¼melin <volker.ruemelin@t-online.de> | 2020-11-23 21:34:01 +0100 |
---|---|---|
committer | Volker RĂ¼melin <volker.ruemelin@t-online.de> | 2020-11-23 21:42:58 +0100 |
commit | 7190a31b5f19947011806a22d7ae4641a7fbad8d (patch) | |
tree | ebba2327ae6c1fdfd04bebe8adf0d3ad0b056b96 | |
parent | 729f0073798d238b52b29e335acd6cde8440deae (diff) | |
download | gtk+-7190a31b5f19947011806a22d7ae4641a7fbad8d.tar.gz |
gdk/win32: fix integer overflow in monitor refresh rate calculation
In gdk/win32/gdkmonitor-win32.c in function
populate_monitor_devices_from_display_config() refresh->Numerator * 1000
overflows for refresh->Numerator > 4294976.
Cast the factor 1000 to UINT64 to prevent the overflow.
Fixes #3394
-rw-r--r-- | gdk/win32/gdkmonitor-win32.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdk/win32/gdkmonitor-win32.c b/gdk/win32/gdkmonitor-win32.c index 0f02bef14f..b149a33b63 100644 --- a/gdk/win32/gdkmonitor-win32.c +++ b/gdk/win32/gdkmonitor-win32.c @@ -509,7 +509,7 @@ populate_monitor_devices_from_display_config (GPtrArray *monitors) refresh = &dispconf_paths[path_index].targetInfo.refreshRate; gdk_monitor_set_refresh_rate (mon, - refresh->Numerator * 1000 / refresh->Denominator); + refresh->Numerator * (UINT64) 1000 / refresh->Denominator); } g_free (dispconf_paths); |