mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-26 06:30:06 +01:00
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: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 9ddbb03fa5)
This commit is contained in:
parent
aa6a18fdeb
commit
e8fae02f19
1 changed files with 1 additions and 1 deletions
|
|
@ -3980,7 +3980,7 @@ DeliverGrabbedEvent(InternalEvent *event, DeviceIntPtr thisDev,
|
|||
FreezeThaw(dev, TRUE);
|
||||
if ((dev->deviceGrab.sync.state == FREEZE_BOTH_NEXT_EVENT) &&
|
||||
(CLIENT_BITS(grab->resource) ==
|
||||
CLIENT_BITS(dev->deviceGrab.sync.other->resource)))
|
||||
CLIENT_BITS(dev->deviceGrab.grab->resource)))
|
||||
dev->deviceGrab.sync.state = FROZEN_NO_EVENT;
|
||||
else
|
||||
dev->deviceGrab.sync.other = grab;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue