Author: janderwald
Date: Tue Oct 23 04:54:37 2012
New Revision: 57598
URL:
http://svn.reactos.org/svn/reactos?rev=57598&view=rev
Log:
[USBD]
- Don't assert on invalid usb descriptor
- Core-6574
Modified:
trunk/reactos/drivers/usb/usbd/usbd.c
Modified: trunk/reactos/drivers/usb/usbd/usbd.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbd/usbd.c?re…
==============================================================================
--- trunk/reactos/drivers/usb/usbd/usbd.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/usb/usbd/usbd.c [iso-8859-1] Tue Oct 23 04:54:37 2012
@@ -474,8 +474,11 @@
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);