Re: [PATCH] HID: hid-lg4ff: Add check for empty lbuf

From: Jiri Kosina
Date: Mon Nov 14 2022 - 17:58:13 EST


On Fri, 11 Nov 2022, Anastasia Belova wrote:

> If an empty buf is received, lbuf is also empty. So lbuf is
> accessed by index -1.

Good catch, thanks!

> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Fixes: f31a2de3fe36 ("HID: hid-lg4ff: Allow switching of Logitech gaming wheels between compatibility modes")
>
> Signed-off-by: Anastasia Belova <abelova@xxxxxxxxxxxxx>

I've put the Fixes: line into the SOB/metadata space, and applied. Thank
you,

--
Jiri Kosina
SUSE Labs