aboutsummaryrefslogtreecommitdiff
path: root/pixman/test/stress-test.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-08-03 09:39:10 +0200
committermarha <marha@users.sourceforge.net>2012-08-03 09:39:10 +0200
commite158f8fc4a9cf2f884d156ff2dfc0870facfbcba (patch)
tree9642a988d6674f27d6971ec2be7e2cdacc784862 /pixman/test/stress-test.c
parentebfd1ae8f80dd16f99f9ef89c28a06f809d07f8d (diff)
parent18e75aa6ae27a6e44d93babd96afbbe0cd6077c8 (diff)
downloadvcxsrv-e158f8fc4a9cf2f884d156ff2dfc0870facfbcba.tar.gz
vcxsrv-e158f8fc4a9cf2f884d156ff2dfc0870facfbcba.tar.bz2
vcxsrv-e158f8fc4a9cf2f884d156ff2dfc0870facfbcba.zip
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'pixman/test/stress-test.c')
-rw-r--r--pixman/test/stress-test.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/pixman/test/stress-test.c b/pixman/test/stress-test.c
index 54ab1c5a9..edcfe0947 100644
--- a/pixman/test/stress-test.c
+++ b/pixman/test/stress-test.c
@@ -468,6 +468,11 @@ set_general_properties (pixman_image_t *image, pixman_bool_t allow_alpha_map)
width = lcg_rand_n (image->bits.width) - x + 10;
height = lcg_rand_n (image->bits.height) - y + 10;
+ if (width + x < x)
+ width = INT32_MAX - x;
+ if (height + y < y)
+ height = INT32_MAX - y;
+
pixman_region32_union_rect (
&region, &region, x, y, width, height);
}