mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-28 08:40:07 +01:00
TouchListenerAcceptReject: Warn and return early on bad listener index
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Reviewed-by: Bryce Harrington <bryce@canonical.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 5c361d59c5)
This commit is contained in:
parent
ed33772a0d
commit
345761be71
1 changed files with 5 additions and 0 deletions
|
|
@ -966,6 +966,11 @@ TouchListenerAcceptReject(DeviceIntPtr dev, TouchPointInfoPtr ti, int listener,
|
|||
int nev;
|
||||
int i;
|
||||
|
||||
BUG_WARN(listener < 0);
|
||||
BUG_WARN(listener >= ti->num_listeners);
|
||||
if (listener < 0 || listener >= ti->num_listeners)
|
||||
return BadMatch;
|
||||
|
||||
if (listener > 0) {
|
||||
if (mode == XIRejectTouch)
|
||||
TouchRejected(dev, ti, ti->listeners[listener].listener, NULL);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue