Dan Carpenter 8591958413 HID: roccat: prevent an out of bounds read in kovaplus_profile_activated()
[ Upstream commit 7ad81482cad67cbe1ec808490d1ddfc420c42008 ]

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: 0e70f97f257e ("HID: roccat: Add support for Kova[+] mouse")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Silvan Jegen <s.jegen@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-26 11:02:10 +02:00
..
2015-10-21 13:15:53 +02:00
2014-08-21 10:43:28 -05:00
2018-04-24 09:36:28 +02:00
2018-03-19 08:42:47 +01:00
2015-12-28 13:41:44 +01:00
2017-05-11 10:27:48 +02:00
2018-04-24 09:36:28 +02:00
2015-12-28 13:41:44 +01:00
2018-04-24 09:36:28 +02:00
2015-12-28 13:41:51 +01:00
2015-12-28 13:41:51 +01:00
2015-12-28 13:41:51 +01:00
2015-12-28 13:41:51 +01:00
2015-12-28 13:41:51 +01:00
2015-12-28 13:41:51 +01:00
2015-12-28 13:41:51 +01:00
2015-05-07 10:47:53 +02:00
2015-12-28 13:41:44 +01:00
2014-08-21 10:43:28 -05:00
2015-12-28 13:41:44 +01:00
2017-11-21 09:49:23 +01:00
2017-07-27 15:14:28 +02:00
2018-04-24 09:36:28 +02:00