mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-08 14:10:18 +01:00
xfree86: Check for existence of button class before dereferencing it.
The Irxon Super Mini Bluetooth Wireless Keyboard for PC/PDA/Cell Phones
keyboards have axes but not buttons. The evdev driver doesn't set up a
button class for these keyboards and a motion event handled by
DGAProcessPointerEvent dereferences the dev->button NULL pointer, causing a
server crash.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit e00e2e7b68)
This commit is contained in:
parent
5a29cb126d
commit
918cb214ab
1 changed files with 1 additions and 1 deletions
|
|
@ -1095,7 +1095,7 @@ DGAProcessPointerEvent (ScreenPtr pScreen, DGAEvent *event, DeviceIntPtr mouse)
|
|||
ev.header = ET_Internal;
|
||||
ev.length = sizeof(ev);
|
||||
ev.type = event->subtype;
|
||||
ev.corestate = butc->state;
|
||||
ev.corestate = butc ? butc->state : 0;
|
||||
if (master && master->key)
|
||||
ev.corestate |= XkbStateFieldFromRec(&master->key->xkbInfo->state);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue