]> git.baikalelectronics.ru Git - kernel.git/commit
HID: fix incorrent length condition in hidraw_write()
authorJiri Kosina <jkosina@suse.cz>
Wed, 17 Sep 2008 17:41:58 +0000 (19:41 +0200)
committerJiri Kosina <jkosina@suse.cz>
Tue, 14 Oct 2008 21:51:00 +0000 (23:51 +0200)
commit7c9255c55e27350f3ed3a568de1c9cf8b62eed92
treec287d509c0a16a2c7d30b00d413a8a3b81e5188a
parent05827bb4df47cdacddc0efd37b744ad3ce4169c5
HID: fix incorrent length condition in hidraw_write()

The bound check on the buffer length

if (count > HID_MIN_BUFFER_SIZE)

is of course incorrent, the proper check is

if (count > HID_MAX_BUFFER_SIZE)

Fix it.

Reported-by: Jerry Ryle <jerry@mindtribe.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hidraw.c