From e92417b7805315ff38a3d5758bd7075418d3ae6d Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Tue, 17 Mar 2009 13:28:31 +0000 Subject: [PATCH] Check for failure when intersecting regions. Need to check and report the failure of intersecting the rectangle with the clip region during pixman_image_fill_rectangles(). --- pixman/pixman-image.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pixman/pixman-image.c b/pixman/pixman-image.c index e80c479..8b56ac2 100644 --- a/pixman/pixman-image.c +++ b/pixman/pixman-image.c @@ -703,7 +703,11 @@ pixman_image_fill_rectangles (pixman_op_t op, pixman_box32_t *boxes; pixman_region32_init_rect (&fill_region, rects[i].x, rects[i].y, rects[i].width, rects[i].height); - pixman_region32_intersect (&fill_region, &fill_region, &dest->common.clip_region); + if (!pixman_region32_intersect (&fill_region, + &fill_region, + &dest->common.clip_region)) + return FALSE; + boxes = pixman_region32_rectangles (&fill_region, &n_boxes); for (j = 0; j < n_boxes; ++j) -- 2.7.4