diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/evdev.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/evdev.c b/src/evdev.c index 1a385c9..651b895 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -751,6 +751,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 { |