summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSøren Sandmann Pedersen <ssp@redhat.com>2013-10-23 17:28:11 -0400
committerSøren Sandmann Pedersen <ssp@redhat.com>2013-11-01 20:24:27 -0400
commit2f876cf86718d3dd9b3b04ae9552530edafe58a1 (patch)
tree3863f28c8bd1a52a401cfbef6ee1bc58f3a9a31d
parent8ef7e0d18e00291da14c69d3034896235875d019 (diff)
test/trap-crasher.c: Add trapezoid that demonstrates a crash
This trapezoid causes a crash due to an underflow in the pixman_trapezoid_valid(). Test case from Ritesh Khadgaray.
-rw-r--r--test/trap-crasher.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/test/trap-crasher.c b/test/trap-crasher.c
index 4e4cac2..77be1c9 100644
--- a/test/trap-crasher.c
+++ b/test/trap-crasher.c
@@ -5,7 +5,7 @@ int
main()
{
pixman_image_t *dst;
- pixman_trapezoid_t traps[1] = {
+ pixman_trapezoid_t traps[] = {
{
2147483646,
2147483647,
@@ -18,6 +18,18 @@ main()
{ 0, 2147483647 }
}
},
+ {
+ 32768,
+ - 2147483647,
+ {
+ { 0, 0 },
+ { 0, 2147483647 }
+ },
+ {
+ { 65536, 0 },
+ { 0, 2147483647 }
+ }
+ },
};
dst = pixman_image_create_bits (PIXMAN_a8, 1, 1, NULL, -1);