Bug 5625

Summary: EvdevAddButtonClass sets up button mapping incorrectly
Product: xorg Reporter: jsberg04+computing.bugs.freedesktop
Component: Input/evdevAssignee: Zephaniah E. Hull <warp-spam+fdo>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: high CC: warp-spam+fdo
Version: 7.0.0   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Patch to fix off-by-one error in EvdevAddButtonClass
none
attach none

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]
attach

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.