After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 590627 - int range overflow in constraints calculations
int range overflow in constraints calculations
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2009-08-03 14:05 UTC by Tomas Frydrych
Modified: 2009-08-04 07:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to fix overflow in constraints calculations (1.28 KB, patch)
2009-08-03 14:08 UTC, Tomas Frydrych
committed Details | Review

Description Tomas Frydrych 2009-08-03 14:05:38 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.
Comment 1 Tomas Frydrych 2009-08-03 14:08:02 UTC
Created attachment 139787 [details] [review]
Patch to fix overflow in constraints calculations
Comment 2 Owen Taylor 2009-08-03 19:00:52 UTC
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.
Comment 3 Tomas Frydrych 2009-08-04 07:45:34 UTC
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.)