summaryrefslogtreecommitdiff
path: root/Xi/exevents.c
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@herrb.eu>2021-11-16 23:38:46 +0100
committerPovilas Kanapickas <povilas@radix.lt>2021-12-19 20:01:04 +0000
commit5b8817a019845e1066c373022133985a0e2d718f (patch)
tree50d8fdf92c2b62ce6e0c9db51f63564ecfae4feb /Xi/exevents.c
parent35f0e1ade855c84e44f170f5147062d7d853ea64 (diff)
Convert more funcs to use InternalEvent.
This fixes a crash when a DeviceEvent struct converted to InteralEvent was beeing copied as InternalEvent (and thus causing out of bounds reads) in ActivateGrabNoDelivery() in events.c: 3876 *grabinfo->sync.event = *real_event; Possible fix for https://gitlab.freedesktop.org/xorg/xserver/-/issues/1253 Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
Diffstat (limited to 'Xi/exevents.c')
-rw-r--r--Xi/exevents.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Xi/exevents.c b/Xi/exevents.c
index 9d4886212..94b9983bd 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -1901,7 +1901,7 @@ ProcessDeviceEvent(InternalEvent *ev, DeviceIntPtr device)
* nested) to clients. */
if (event->source_type == EVENT_SOURCE_FOCUS)
return;
- if (!grab && CheckDeviceGrabs(device, event, 0))
+ if (!grab && CheckDeviceGrabs(device, ev, 0))
return;
break;
case ET_KeyRelease:
@@ -1914,7 +1914,7 @@ ProcessDeviceEvent(InternalEvent *ev, DeviceIntPtr device)
if (b->map[key] == 0) /* there's no button 0 */
return;
event->detail.button = b->map[key];
- if (!grab && CheckDeviceGrabs(device, event, 0)) {
+ if (!grab && CheckDeviceGrabs(device, ev, 0)) {
/* if a passive grab was activated, the event has been sent
* already */
return;