stress-test: Avoid overflows in clip rectangles
authorSøren Sandmann Pedersen <ssp@redhat.com>
Mon, 30 Jul 2012 20:10:05 +0000 (16:10 -0400)
committerSøren Sandmann Pedersen <ssp@redhat.com>
Wed, 1 Aug 2012 03:51:53 +0000 (23:51 -0400)
commit38fe7cd7be388aae6dff7d9b9979eb4ffa5fa175
tree69657bed172359deba711df9052d08f6ea73d36f
parent24d83cbf3df06505fa4cf827271aa2985414cfdd
stress-test: Avoid overflows in clip rectangles

The rectangles in the clip region set in set_general_properties()
would sometimes overflow, which would lead to messages like these:

      *** BUG ***
      In pixman_region32_union_rect: Invalid rectangle passed
      Set a breakpoint on '_pixman_log_error' to debug

when the micro version number of pixman is even.

Fix this by detecting the overflow and clamping such that the x2/y2
coordinates are less than INT32_MAX.
test/stress-test.c