Skip to content
Commit 072dff82 authored by Olivier Fourdan's avatar Olivier Fourdan Committed by Adam Jackson
Browse files

dix: avoid deferencing NULL PtrCtrl

PtrCtrl really makes sense for relative pointing device only, absolute
devices such as touch devices do not have any PtrCtrl set.

In some cases, if the client issues a XGetPointerControl() immediatlely
after a ChangeMasterDeviceClasses() copied the touch device to the VCP,
a NULL pointer dereference will occur leading to a crash of Xwayland.

Check whether the PtrCtrl is not NULL in ProcGetPointerControl() and
return the default control values otherwise, to avoid the NULL pointer
dereference.

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1519533


Reviewed-by: default avatarAdam Jackson <ajax@redhat.com>
Signed-off-by: default avatarOlivier Fourdan <ofourdan@redhat.com>
(cherry picked from commit 9f7a9be1)
parent f9a55653
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment