Skip to content
Snippets Groups Projects
Commit e8fae02f authored by Peter Hutterer's avatar Peter Hutterer
Browse files

dix: Fix crash in DeliverGrabbedEvents.


If both devices are synchronously grabbed, first with a GrabPointer, then
with a GrabKeyboard (GrabModeSync on both), sync.other of each device points
to the grab of the respective other device.

If the keyboard is then thawed through a AllowSome request, the VCK's
sync.other is reset to NULL. Subsequently, an event on the VCP would crash
the server when dereferencing sync.other on the VCP.

The check's purpose is to compare if the other device is grabbed by the same
client, which should be checked by accessing (dev->deviceGrab->grab->resource).
A check of the server-1.3 sources confirms that.

XTS test case: Xlib13 XAllowEvents 20.

Signed-off-by: default avatarPeter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: default avatarKeith Packard <keithp@keithp.com>
Signed-off-by: default avatarKeith Packard <keithp@keithp.com>
(cherry picked from commit 9ddbb03f)
parent aa6a18fd
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment