summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Neukum <oliver@neukum.org>2009-04-04 09:25:15 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2009-04-17 19:50:24 +0200
commite13c594f3a1fc2c78e7a20d1a07974f71e4b448f (patch)
tree8492d168693800146ca08333a5431ae15ed2efa0
parentUSB: qcserial: Add extra device IDs (diff)
downloadlinux-e13c594f3a1fc2c78e7a20d1a07974f71e4b448f.tar.xz
linux-e13c594f3a1fc2c78e7a20d1a07974f71e4b448f.zip
USB: fix oops in cdc-wdm in case of malformed descriptors
cdc-wdm needs to ignore extremely malformed descriptors. Signed-off-by: Oliver Neukum <oliver@neukum.org> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/usb/class/cdc-wdm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c
index 3771d6e6d0cc..34e6108e1d42 100644
--- a/drivers/usb/class/cdc-wdm.c
+++ b/drivers/usb/class/cdc-wdm.c
@@ -652,7 +652,7 @@ next_desc:
iface = &intf->altsetting[0];
ep = &iface->endpoint[0].desc;
- if (!usb_endpoint_is_int_in(ep)) {
+ if (!ep || !usb_endpoint_is_int_in(ep)) {
rv = -EINVAL;
goto err;
}