]> git.baikalelectronics.ru Git - kernel.git/commit
usb: storage: onetouch: tighten a range check
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 1 Mar 2013 05:14:19 +0000 (08:14 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 15 Mar 2013 18:45:16 +0000 (11:45 -0700)
commit4267fab32e47289ea8059f9656307102d6f29fdf
tree825d4e5fd91842776212a7a9975c0ef9c1886a7e
parentb5af49ea5d841dad47d11745e4af1e6c0bd992c7
usb: storage: onetouch: tighten a range check

Smatch complains because we only allocate ONETOUCH_PKT_LEN (2) bytes
but later when we call usb_fill_int_urb() we assume maxp can be up
to 8 bytes.  I talked to the maintainer and maxp should be capped at
ONETOUCH_PKT_LEN.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/storage/onetouch.c