diff options
author | Oliver Neukum <oliver@neukum.org> | 2009-04-04 03:25:15 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-04-17 13:50:24 -0400 |
commit | e13c594f3a1fc2c78e7a20d1a07974f71e4b448f (patch) | |
tree | 8492d168693800146ca08333a5431ae15ed2efa0 /drivers/usb/class | |
parent | f05932c0caf40c43af8a2c21adf7c46a00c436c4 (diff) |
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>
Diffstat (limited to 'drivers/usb/class')
-rw-r--r-- | drivers/usb/class/cdc-wdm.c | 2 |
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: | |||
652 | 652 | ||
653 | iface = &intf->altsetting[0]; | 653 | iface = &intf->altsetting[0]; |
654 | ep = &iface->endpoint[0].desc; | 654 | ep = &iface->endpoint[0].desc; |
655 | if (!usb_endpoint_is_int_in(ep)) { | 655 | if (!ep || !usb_endpoint_is_int_in(ep)) { |
656 | rv = -EINVAL; | 656 | rv = -EINVAL; |
657 | goto err; | 657 | goto err; |
658 | } | 658 | } |