Files
gtk3/gdk
Alexander Larsson 3c618f2f1f Avoid integer overflow in gdk_rectangle_intersect
If e.g. the right edge of the leftmost rectangle is near MIN_INT, and
the left edge of the rightmost rectangle is large then subtracting these
can lead to an integer overflow, making the resultant "width" falsely
positive, thus returning a very wide result instead of the expected
no-intersection result.

We avoid the overflow by not doing the subtraction unless we know the
result will be positive. There are still risks for overflow if x + width
or y + width is larger than MAXINT, but we won't ever overflow for valid
rects now.

This may fix #607687
2010-01-22 09:41:17 +01:00
..
2009-09-01 17:06:41 +02:00
2009-09-04 23:27:37 -04:00
2008-07-01 22:57:50 +00:00
2009-01-20 02:27:57 +00:00
2009-05-29 16:39:12 +02:00
2008-07-01 22:57:50 +00:00
2008-07-01 22:57:50 +00:00
2010-01-11 10:23:57 -05:00
2008-07-01 22:57:50 +00:00
2008-07-01 22:57:50 +00:00
2008-07-01 22:57:50 +00:00
2008-07-01 22:57:50 +00:00
2008-07-01 22:57:50 +00:00
2009-04-02 10:14:01 +02:00
2008-07-01 22:57:50 +00:00
2008-07-01 22:57:50 +00:00
2008-07-01 22:57:50 +00:00
2009-07-05 20:56:44 -04:00
2008-07-01 22:57:50 +00:00
2008-07-01 22:57:50 +00:00
2008-07-01 22:57:50 +00:00
2008-07-04 04:02:35 +00:00
2008-10-28 22:55:23 +00:00
2009-12-31 01:48:50 +01:00
2009-10-26 18:19:48 +01:00