mirror of
https://github.com/reactos/reactos.git
synced 2024-10-04 16:36:11 +00:00
[USBD]
- Don't assert on invalid usb descriptor - Core-6574 svn path=/trunk/; revision=57598
This commit is contained in:
parent
ed3d75f9de
commit
d1e0226d49
|
@ -474,8 +474,11 @@ USBD_ParseDescriptors(
|
|||
return CommonDescriptor;
|
||||
}
|
||||
|
||||
/* sanity check */
|
||||
ASSERT(CommonDescriptor->bLength);
|
||||
if (CommonDescriptor->bLength == 0)
|
||||
{
|
||||
/* invalid usb descriptor */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* move to next descriptor */
|
||||
CommonDescriptor = (PUSB_COMMON_DESCRIPTOR)((ULONG_PTR)CommonDescriptor + CommonDescriptor->bLength);
|
||||
|
|
Loading…
Reference in a new issue