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 751136 - xprops: Don't pass ULONG_MAX as a uint32_t parameter
xprops: Don't pass ULONG_MAX as a uint32_t parameter
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2015-06-18 03:37 UTC by Jonas Ådahl
Modified: 2015-06-18 03:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
xprops: Don't pass ULONG_MAX as a uint32_t parameter (1.02 KB, patch)
2015-06-18 03:38 UTC, Jonas Ådahl
committed Details | Review

Description Jonas Ådahl 2015-06-18 03:37:59 UTC
It seems the largest possible value is to be passed, so actually pass
that instead. Note that even though the name of the xcb_get_property
parameter is called 'long_length' its actually a uint32_t.
Comment 1 Jonas Ådahl 2015-06-18 03:38:03 UTC
Created attachment 305513 [details] [review]
xprops: Don't pass ULONG_MAX as a uint32_t parameter
Comment 2 Jasper St. Pierre (not reading bugmail) 2015-06-18 03:48:19 UTC
Review of attachment 305513 [details] [review]:

Nice catch, thank you. It's weird that it accepted G_MAXLONG before, though.
Comment 3 Jonas Ådahl 2015-06-18 03:51:07 UTC
Attachment 305513 [details] pushed as bbf2b4e - xprops: Don't pass ULONG_MAX as a uint32_t parameter
Comment 4 Jonas Ådahl 2015-06-18 03:52:30 UTC
(In reply to Jasper St. Pierre from comment #2)
> Review of attachment 305513 [details] [review] [review]:
> 
> Nice catch, thank you. It's weird that it accepted G_MAXLONG before, though.

Indeed. Looking at the old code, it seems to have been long until it was written to some struct. Can't remember whether I saw a warning before though.