projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f563926
)
usb: core: check for valid id_table when using the RefId feature
author
Wolfram Sang
<wsa@the-dreams.de>
Mon, 13 Jan 2014 10:29:23 +0000
(11:29 +0100)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Mon, 13 Jan 2014 23:54:03 +0000
(15:54 -0800)
When implementing the RefId feature, it was missed that id_tables can be
NULL under special circumstances. Bail out in that case.
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/driver.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/usb/core/driver.c
b/drivers/usb/core/driver.c
index 620a0baf103e1c2017865fa586e984010430e860..5d01558cef666233b47f29d569595a1f42dda8b2 100644
(file)
--- a/
drivers/usb/core/driver.c
+++ b/
drivers/usb/core/driver.c
@@
-73,6
+73,9
@@
ssize_t usb_store_new_id(struct usb_dynids *dynids,
if (fields > 4) {
const struct usb_device_id *id = id_table;
+ if (!id)
+ return -ENODEV;
+
for (; id->match_flags; id++)
if (id->idVendor == refVendor && id->idProduct == refProduct)
break;