[PATCH libinput 1/2] Fix a crash when requesting invalid mode group indices
Hans de Goede
hdegoede at redhat.com
Fri Feb 24 08:36:54 UTC 2017
Hi,
On 24-02-17 05:41, Peter Hutterer wrote:
> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
Patch series looks good to me:
Reviewed-by: Hans de Goede <hdegoede at redhat.com>
Regards,
Hans
> ---
> src/evdev-tablet-pad-leds.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/src/evdev-tablet-pad-leds.c b/src/evdev-tablet-pad-leds.c
> index 209ab73..89b3b9d 100644
> --- a/src/evdev-tablet-pad-leds.c
> +++ b/src/evdev-tablet-pad-leds.c
> @@ -645,5 +645,9 @@ evdev_device_tablet_pad_get_mode_group(struct evdev_device *device,
> if (!(device->seat_caps & EVDEV_DEVICE_TABLET_PAD))
> return NULL;
>
> + if (index >=
> + (unsigned int)evdev_device_tablet_pad_get_num_mode_groups(device))
> + return NULL;
> +
> return pad_get_mode_group(pad, index);
> }
>
More information about the wayland-devel
mailing list