[gtk/gtk-3-24: 1/2] Backport 'fix integer overflow in monitor refresh rate calculation' to GTK3




commit 547ea8b073d19527a6672dcce9b81a14f6ad2d6a
Author: Luca Bacci <luca bacci982 gmail com>
Date:   Fri Jun 4 17:43:24 2021 +0200

    Backport 'fix integer overflow in monitor refresh rate calculation' to GTK3
    
    Original MR by Volker RĂ¼melin.
    
    See https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/2884

 gdk/win32/gdkmonitor-win32.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gdk/win32/gdkmonitor-win32.c b/gdk/win32/gdkmonitor-win32.c
index 1c5d9ff994..da7aff708f 100644
--- a/gdk/win32/gdkmonitor-win32.c
+++ b/gdk/win32/gdkmonitor-win32.c
@@ -523,7 +523,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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]