Gitweb: http://git.kernel.org/linus/e13c594f3a1fc2c78e7a20d1a07974f71e4b448f Commit: e13c594f3a1fc2c78e7a20d1a07974f71e4b448f Parent: f05932c0caf40c43af8a2c21adf7c46a00c436c4 Author: Oliver Neukum <oliver@neukum.org> AuthorDate: Sat Apr 4 09:25:15 2009 +0200 Committer: Greg Kroah-Hartman <gregkh@suse.de> CommitDate: Fri Apr 17 10:50:24 2009 -0700 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> --- 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 3771d6e..34e6108 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; } -- To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
