HID: roccat: prevent an out of bounds read in kovaplus_profile_activated()
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: NDan Carpenter <dan.carpenter@oracle.com> Acked-by: NSilvan Jegen <s.jegen@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
Showing
想要评论请 注册 或 登录