Revision: 14338
http://edk2.svn.sourceforge.net/edk2/?rev=14338&view=rev
Author: erictian
Date: 2013-05-10 05:19:30 +0000 (Fri, 10 May 2013)
Log Message:
-----------
MdeMdeModulePkg/UsbBusDxe: Break device enumeration process if the device
descriptor includes 0 configuration.
Signed-off-by: Feng Tian <[email protected]>
Reviewed-by: Mike Wu <[email protected]>
Modified Paths:
--------------
trunk/edk2/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbDesc.c
Modified: trunk/edk2/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbDesc.c
===================================================================
--- trunk/edk2/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbDesc.c 2013-05-09 16:18:58 UTC
(rev 14337)
+++ trunk/edk2/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbDesc.c 2013-05-10 05:19:30 UTC
(rev 14338)
@@ -786,10 +786,13 @@
return Status;
}
- DevDesc = UsbDev->DevDesc;
- NumConfig = DevDesc->Desc.NumConfigurations;
+ DevDesc = UsbDev->DevDesc;
+ NumConfig = DevDesc->Desc.NumConfigurations;
+ if (NumConfig == 0) {
+ return EFI_DEVICE_ERROR;
+ }
+
DevDesc->Configs = AllocateZeroPool (NumConfig * sizeof (USB_CONFIG_DESC *));
-
if (DevDesc->Configs == NULL) {
return EFI_OUT_OF_RESOURCES;
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and
their applications. This 200-page book is written by three acclaimed
leaders in the field. The early access version is available now.
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits