projects
/
platform
/
upstream
/
pixman.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e3a6df0
)
Handle degenerate case in pixman_init_rect()
author
Benjamin Otte
<otte@gnome.org>
Fri, 17 Jul 2009 14:01:59 +0000
(16:01 +0200)
committer
Benjamin Otte
<otte@gnome.org>
Fri, 17 Jul 2009 14:04:15 +0000
(16:04 +0200)
Create an empty region in that case.
pixman/pixman-region.c
patch
|
blob
|
history
diff --git
a/pixman/pixman-region.c
b/pixman/pixman-region.c
index 7328a63fb953de756720cac9e35c048bc38d1278..a37d381b1d0472aa6b89d4e8c8ad828e37bd0b25 100644
(file)
--- 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;