From 2be5401b1e9c77e7ad9e2d51cfbf1454ee23a18b Mon Sep 17 00:00:00 2001 From: Giovanni Campagna Date: Sat, 14 Dec 2013 14:22:40 +0100 Subject: [PATCH] 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-x11.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/window-x11.c b/src/core/window-x11.c index 4866c659d..d984a59c3 100644 --- a/src/core/window-x11.c +++ b/src/core/window-x11.c @@ -377,9 +377,9 @@ meta_window_x11_update_input_region (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);