summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPovilas Kanapickas <povilas@radix.lt>2022-01-23 22:18:52 +0200
committerPovilas Kanapickas <povilas@radix.lt>2022-02-09 11:33:03 +0000
commit6ef5c05728f8b18170fbc8415d7502495a08670b (patch)
treec9f4456d70f4b88e8ca681c7fc28eb8ceb74081e /include
parent34b870da8833b2450f48fd8036c9a7eff5c19e95 (diff)
dix: Correctly save replayed event into GrabInfoRec
When processing events we operate on InternalEvent pointers. They may actually refer to a an instance of DeviceEvent, GestureEvent or any other event that comprises the InternalEvent union. This works well in practice because we always look into event type before doing anything, except in the case of copying the event. *dst_event = *src_event would copy whole InternalEvent event and would cause out of bounds read in case the pointed to event was not InternalEvent but e.g. DeviceEvent. This regression has been introduced in 23a8b62d34344575f9df9d057fb74bfefa94a77b. Fixes https://gitlab.freedesktop.org/xorg/xserver/-/issues/1261 Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
Diffstat (limited to 'include')
-rw-r--r--include/input.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/input.h b/include/input.h
index b1aef3663..cdb5d5a90 100644
--- a/include/input.h
+++ b/include/input.h
@@ -676,6 +676,7 @@ extern void GestureEmitGestureEndToOwner(DeviceIntPtr dev, GestureInfoPtr gi);
extern void ProcessGestureEvent(InternalEvent *ev, DeviceIntPtr dev);
/* misc event helpers */
+extern void CopyPartialInternalEvent(InternalEvent* dst_event, const InternalEvent* src_event);
extern Mask GetEventMask(DeviceIntPtr dev, xEvent *ev, InputClientsPtr clients);
extern Mask GetEventFilter(DeviceIntPtr dev, xEvent *event);
extern Bool WindowXI2MaskIsset(DeviceIntPtr dev, WindowPtr win, xEvent *ev);