]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
HID: roccat: potential out of bounds in pyra_sysfs_write_settings()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 9 Jan 2015 12:32:31 +0000 (15:32 +0300)
committerJiri Kosina <jkosina@suse.cz>
Fri, 9 Jan 2015 13:41:01 +0000 (14:41 +0100)
commit606185b20caf4c57d7e41e5a5ea4aff460aef2ab
tree87bf17410210321b32cf170fa06e8e91e0e98fa5
parent2bacedada682d5485424f5227f27a3d5d6eb551c
HID: roccat: potential out of bounds in pyra_sysfs_write_settings()

This is a static checker fix.  We write some binary settings to the
sysfs file.  One of the settings is the "->startup_profile".  There
isn't any checking to make sure it fits into the
pyra->profile_settings[] array in the profile_activated() function.

I added a check to pyra_sysfs_write_settings() in both places because
I wasn't positive that the other callers were correct.

Cc: <stable@vger.kernel.org>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-roccat-pyra.c