tablet: check libevdev_get_abs_info() return value
authorJosé Expósito <jose.exposito89@gmail.com>
Mon, 12 Sep 2022 16:28:38 +0000 (18:28 +0200)
committerJosé Expósito <jose.exposito89@gmail.com>
Sun, 18 Sep 2022 14:00:26 +0000 (16:00 +0200)
commit806d4a1393db6b64bc596f60f112182586c4fa12
tree55889d276e2c9cfb671cbc8566714a4b51dd795d
parentad71c74885081a0e9d88953d2237f2a26a6f0ffa
tablet: check libevdev_get_abs_info() return value

Commit b5f0536a4f93 ("quirks: add a quirk for the Wacom 524c device")
added the quirk "AttrEventCodeDisable=ABS_TILT_X;ABS_TILT_Y;" to the
Wacom 524c.

When using the pen in a display with tilt support, the tilt X/Y axes
are set as changed. Using the pen again, but this time in the display
without tilt support, will try to get the tilt information, crashing.

Check the return value of libevdev_get_abs_info() to avoid this crash.

Fix https://gitlab.freedesktop.org/libinput/libinput/-/issues/805
Fixes: b5f0536a4f93 ("quirks: add a quirk for the Wacom 524c device")
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
src/evdev-tablet.c