Commit 345761be authored by Chase Douglas's avatar Chase Douglas Committed by Peter Hutterer

TouchListenerAcceptReject: Warn and return early on bad listener index

Signed-off-by: default avatarChase Douglas <>
Reviewed-by: default avatarBryce Harrington <>
Signed-off-by: Peter Hutterer's avatarPeter Hutterer <>
(cherry picked from commit 5c361d59)
parent ed33772a
......@@ -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);
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment