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 690588 - Wacom plugin uses 'int' instead of 'long' for 32-bit Xlib parameter
Wacom plugin uses 'int' instead of 'long' for 32-bit Xlib parameter
Status: RESOLVED FIXED
Product: gnome-settings-daemon
Classification: Core
Component: wacom
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Control-Center Maintainers
gnome-settings-daemon-maint
Depends on:
Blocks:
 
 
Reported: 2012-12-21 01:55 UTC by Jason Gerecke
Modified: 2013-01-02 16:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (1.00 KB, patch)
2012-12-21 10:59 UTC, Olivier Fourdan
committed Details | Review

Description Jason Gerecke 2012-12-21 01:55:21 UTC
Xlib expects 32-bit properties to be stored in longs, not ints. On 64-bit systems (where sizeof(int) < sizeof(long)), confusing the two can lead to garbage data at best, or a segfault at worst.

The reset_touch_buttons function of gsd-wacom-manager.c suffers from this bug, using 'int action[2]' instead of 'long action[2]'. This leads to xf86-input-wacom receiving garbage instead of the intended second action, and is (partially) responsible for the touchring-triggers-modeswitch bug in recent versions of the driver.
Comment 1 Olivier Fourdan 2012-12-21 10:59:08 UTC
Created attachment 232039 [details] [review]
Proposed patch
Comment 2 Bastien Nocera 2012-12-21 12:02:13 UTC
Review of attachment 232039 [details] [review]:

Commit after fixing that. Don't forget gnome-3-6!

::: plugins/wacom/gsd-wacom-manager.c
@@ +630,3 @@
 	{
 		char *propname;
+		unsigned long action[2]; /* press + release */

glong, not unsigned long.
Comment 3 Bastien Nocera 2013-01-02 16:09:04 UTC
Pushed to gnome-3-6 and master with the fix mentioned in the review.