+VOID
+DumpFullConfigurationDescriptor(
+ IN PFDO_DEVICE_EXTENSION FDODeviceExtension,
+ IN PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor)
+{
+ PUSB_COMMON_DESCRIPTOR Descriptor;
+
+ Descriptor = (PUSB_COMMON_DESCRIPTOR)ConfigurationDescriptor;
+
+ DbgPrint("Bogus ConfigurationDescriptor Found\n");
+ DbgPrint("InterfaceCount %x\n", ConfigurationDescriptor->bNumInterfaces);
+
+ do
+ {
+ if (((ULONG_PTR)Descriptor + Descriptor->bLength) <= ((ULONG_PTR)ConfigurationDescriptor + ConfigurationDescriptor->wTotalLength))
+ break;
+
+ DbgPrint("Descriptor Type %x Length %lu Offset %lu\n", Descriptor->bDescriptorType, Descriptor->bLength, ((ULONG_PTR)Descriptor - (ULONG_PTR)ConfigurationDescriptor));
+
+ // check for invalid descriptors
+ if (!Descriptor->bLength)
+ {
+ DbgPrint("Bogus Descriptor!!!\n");
+ break;
+ }
+
+ // advance to next descriptor
+ Descriptor = (PUSB_COMMON_DESCRIPTOR)((ULONG_PTR)Descriptor + Descriptor->bLength);
+
+ }while(TRUE);
+
+
+}
+
+