diff options
author | Oliver Neukum <oliver@neukum.org> | 2009-04-17 21:20:06 +0000 |
---|---|---|
committer | Chris Wright <chrisw@sous-sol.org> | 2009-04-27 10:37:03 -0700 |
commit | 4be149f9b684906505d49932fd18e1f17721b30f (patch) | |
tree | 1aa859cab0e2c9b39c3888aca39c16bab768eec3 | |
parent | 082240d79158decfc9918b96487da38a750b4d1d (diff) |
USB: fix oops in cdc-wdm in case of malformed descriptors
upstream commit: e13c594f3a1fc2c78e7a20d1a07974f71e4b448f
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>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
-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: 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; } |