mirror of
https://github.com/X11Libre/xf86-input-evdev.git
synced 2026-03-24 09:44:28 +00:00
Check for incoming MT slot indices exceeding the allocated number of slots.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=88715 Signed-off-by: Tobias Himmer <provisorisch@online.de> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
committed by
Peter Hutterer
parent
b370ccdff8
commit
abc4a8b603
@@ -733,6 +733,14 @@ EvdevProcessTouchEvent(InputInfoPtr pInfo, struct input_event *ev)
|
||||
|
||||
if (ev->code == ABS_MT_SLOT) {
|
||||
EvdevProcessTouch(pInfo);
|
||||
if (ev->value >= num_slots(pEvdev) ) {
|
||||
LogMessageVerbSigSafe(X_WARNING, 0,
|
||||
"%s: Slot index %d out of bounds (max %d), touch events may be incorrect.\n",
|
||||
pInfo->name,
|
||||
ev->value,
|
||||
num_slots(pEvdev) - 1);
|
||||
return;
|
||||
}
|
||||
pEvdev->cur_slot = ev->value;
|
||||
} else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user