pixman: Branch 'master'

Benjamin Otte company at kemper.freedesktop.org
Fri Jul 17 07:04:21 PDT 2009


 pixman/pixman-region.c |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit 737d00063e8b8aaeaab9aecd0fbe731e8ab3f6b3
Author: Benjamin Otte <otte at gnome.org>
Date:   Fri Jul 17 16:01:59 2009 +0200

    Handle degenerate case in pixman_init_rect()
    
    Create an empty region in that case.

diff --git a/pixman/pixman-region.c b/pixman/pixman-region.c
index 7328a63..a37d381 100644
--- a/pixman/pixman-region.c
+++ b/pixman/pixman-region.c
@@ -339,6 +339,12 @@ PREFIX (_init_rect) (region_type_t *	region,
 		     unsigned int	width,
 		     unsigned int	height)
 {
+    if (x + (int) width < x || y + (int) height < y)
+    {
+        PREFIX (_init) (region);
+        return;
+    }
+
     region->extents.x1 = x;
     region->extents.y1 = y;
     region->extents.x2 = x + width;


More information about the xorg-commit mailing list