diff options
author | Oliver Neukum <oliver@neukum.org> | 2009-04-17 21:20:06 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-05-02 10:24:29 -0700 |
commit | 42913f4b4783b67a5e9e7f15c56373d63449e463 (patch) | |
tree | e52970d955f075f006c04954dd20443511fcbeaf | |
parent | a8575ac1b8b3736cd1d9c43e33aece398cceb6d1 (diff) | |
download | lwn-42913f4b4783b67a5e9e7f15c56373d63449e463.tar.gz lwn-42913f4b4783b67a5e9e7f15c56373d63449e463.zip |
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>
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 023a4e988f39..abbdb31e3591 100644 --- a/drivers/usb/class/cdc-wdm.c +++ b/drivers/usb/class/cdc-wdm.c @@ -641,7 +641,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; } |