mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 16:24:13 +08:00
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>
This commit is contained in:
parent
f05932c0ca
commit
e13c594f3a
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user