]> git.baikalelectronics.ru Git - kernel.git/commit
usb: core: add sanity checks when using bInterfaceClass with new_id
authorWolfram Sang <wsa@the-dreams.de>
Fri, 10 Jan 2014 18:36:41 +0000 (19:36 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 11 Jan 2014 00:54:35 +0000 (16:54 -0800)
commit200ce2b63f09307337ffe8887a09e5c6a2322adf
treed4f9e03eb7d36baf2753f00d42539ad9f36ff90b
parent52eef0369a988a8ae2e93c0bea95dfeb4f0cdba1
usb: core: add sanity checks when using bInterfaceClass with new_id

Check if that field is actually used and if so, bail out if it exeeds a
u8. Make it also future-proof by not requiring "exactly three"
parameters in new_id, but simply "more than two".

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/driver.c