Commit 50a44c16 authored by Dan Carpenter's avatar Dan Carpenter Committed by Ben Hutchings
Browse files

HID: roccat: prevent an out of bounds read in kovaplus_profile_activated()



commit 7ad81482 upstream.

We get the "new_profile_index" value from the mouse device when we're
handling raw events.  Smatch taints it as untrusted data and complains
that we need a bounds check.  This seems like a reasonable warning
otherwise there is a small read beyond the end of the array.

Fixes: 0e70f97f ("HID: roccat: Add support for Kova[+] mouse")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarSilvan Jegen <s.jegen@gmail.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent f064e3c7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment