[gnome-flashback] common: fix possible integer overflow



commit 523b8b6882606aced0f8632f32f40824083d45fa
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Thu Mar 12 16:01:43 2020 +0200

    common: fix possible integer overflow
    
    CID 1491453.

 gnome-flashback/libcommon/gf-background-utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gnome-flashback/libcommon/gf-background-utils.c b/gnome-flashback/libcommon/gf-background-utils.c
index 853b982..7a32a72 100644
--- a/gnome-flashback/libcommon/gf-background-utils.c
+++ b/gnome-flashback/libcommon/gf-background-utils.c
@@ -73,7 +73,7 @@ get_average_color (cairo_surface_t *surface,
   red_total = 0;
   green_total = 0;
   blue_total = 0;
-  pixels_total = width * height;
+  pixels_total = (guint64) width * height;
 
   for (row = 0; row < height; row++)
     {


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