From 50a44c165a67ff0b7e14d221af6cb6c1035aa90a Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Wed, 10 Jan 2018 12:39:03 +0300 Subject: [PATCH] HID: roccat: prevent an out of bounds read in kovaplus_profile_activated() commit 7ad81482cad67cbe1ec808490d1ddfc420c42008 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: 0e70f97f257e ("HID: roccat: Add support for Kova[+] mouse") Signed-off-by: Dan Carpenter Acked-by: Silvan Jegen Signed-off-by: Jiri Kosina Signed-off-by: Ben Hutchings --- Reading git-format-patch failed