aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-06-23 15:43:16 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-06-23 15:47:41 +1000
commit7bc48c666d702e649dc529b5d928b6a8549514c3 (patch)
tree3769c584ec443be0aedc24c174c8c2b8ecad27b5
parentInitialize the axis labels to 0, not "misc". (diff)
downloadxf86-input-evdev-7bc48c666d702e649dc529b5d928b6a8549514c3.tar.gz
xf86-input-evdev-7bc48c666d702e649dc529b5d928b6a8549514c3.tar.bz2
xf86-input-evdev-7bc48c666d702e649dc529b5d928b6a8549514c3.zip
Fix wrong axis label index causing OOB reads/writes.
The atoms array is filled with each axis atom in mapping order (i.e. after the driver mapping has been applied). 'axis' OTOH is from 0 to ABS_MAX. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--src/evdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/evdev.c b/src/evdev.c
index 922d5f3..12c3e0d 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -1035,7 +1035,7 @@ EvdevAddAbsClass(DeviceIntPtr device)
pEvdev->axis_map[axis] = i;
xf86InitValuatorAxisStruct(device, i,
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
- atoms[axis],
+ atoms[i],
#endif
pEvdev->absinfo[axis].minimum,
pEvdev->absinfo[axis].maximum,