Bug 5625 - EvdevAddButtonClass sets up button mapping incorrectly
Summary: EvdevAddButtonClass sets up button mapping incorrectly
Alias: None
Product: xorg
Classification: Unclassified
Component: Input/evdev (show other bugs)
Version: 7.0.0
Hardware: x86 (IA32) Linux (All)
: high major
Assignee: Zephaniah E. Hull
QA Contact:
Depends on:
Reported: 2006-01-17 05:43 UTC by jsberg04+computing.bugs.freedesktop
Modified: 2015-06-20 13:53 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:

Patch to fix off-by-one error in EvdevAddButtonClass (810 bytes, patch)
2006-01-17 05:45 UTC, jsberg04+computing.bugs.freedesktop
no flags Details | Splinter Review
attach (6.08 KB, text/html)
2015-06-20 13:53 UTC, stiv
no flags Details

Description jsberg04+computing.bugs.freedesktop 2006-01-17 05:43:24 UTC
There's an off-by-one error in EvdevAddButtonClass; InitButtonClassDeviceStruct
looks at elements 1..n of the array passed to it, not 0..n-1.  The result is
that button 32 is mapped to a random number.  Harmless enough, except this
causes gnome-settings-daeamon to crash if the random value is in the range 1..31
(because it tries to call XSetPointerMapping with what it gets from
XGetPointerMapping).  Fix follows.
Comment 1 jsberg04+computing.bugs.freedesktop 2006-01-17 05:45:12 UTC
Created attachment 4372 [details] [review]
Patch to fix off-by-one error in EvdevAddButtonClass
Comment 2 Zephaniah E. Hull 2006-02-16 10:56:54 UTC
This bug should be corrected in the new evdev driver in the modular CVS tree.
Comment 3 Zephaniah E. Hull 2006-02-16 11:02:43 UTC
Reassign to the new evdev maintainer.
Comment 4 stiv 2015-06-20 13:53:15 UTC
Created attachment 116618 [details]

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.