[mutter/gnome-3-10-wayland] window: fix invalid read in computing the input shape



commit 766181eeae0378e40c98e30c6c28c0273344ed37
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Sat Dec 14 14:22:40 2013 +0100

    window: fix invalid read in computing the input shape
    
    If we are reported only one rectangle in the input shape, we should
    not try to read more.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=724257

 src/core/window.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/core/window.c b/src/core/window.c
index 5a863ad..c1d3df7 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -8041,9 +8041,9 @@ meta_window_update_input_region_x11 (MetaWindow *window)
           if (n_rects > 1 ||
               (n_rects == 1 &&
                (rects[0].x != x_bounding ||
-                rects[1].y != y_bounding ||
-                rects[2].width != w_bounding ||
-                rects[3].height != h_bounding)))
+                rects[0].y != y_bounding ||
+                rects[0].width != w_bounding ||
+                rects[0].height != h_bounding)))
             region = region_create_from_x_rectangles (rects, n_rects);
 
           XFree (rects);


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