GNOME Bugzilla – Bug 590627
int range overflow in constraints calculations
Last modified: 2009-08-04 07:45:34 UTC
If application sets max size hint to INT_MAX, we get an overflow in the get_size_limits() function in constraints.c; the attached patch fixes that.
Created attachment 139787 [details] [review] Patch to fix overflow in constraints calculations
Patch looks fine. Any idea why you ran into this and nobody else did? Windows without a maximum size are presumably common and none of the code seems to have changed in the last 4 years or so.
We have a custom constraint in moblin that resizes windows upwards; we noticed that windows such as the terminal were getting resized beyond their maximum size hint. It turned out that due to the overflow, we were not getting correct maximum size for the window + frame. (Commited as 2f63d321d1822ca2928e2d4c148873c306e61b3b.)