diff options
author | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-02-13 03:36:02 +0000 |
---|---|---|
committer | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-02-13 03:36:02 +0000 |
commit | db0bd81c851ff0aa92f2778f7810488714c059c2 (patch) | |
tree | 5e2380a8335cc7f6eca7c83e1ade971be0847977 /MdeModulePkg/Bus | |
parent | b518ea4e87543afcc75a93cc50d66ca2a6004114 (diff) | |
download | edk2-platforms-db0bd81c851ff0aa92f2778f7810488714c059c2.tar.xz |
enhanced security check.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7516 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Bus')
-rw-r--r-- | MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassImpl.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassImpl.c b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassImpl.c index 15fdad573d..f80895bda4 100644 --- a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassImpl.c +++ b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassImpl.c @@ -14,14 +14,14 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include "UsbMassImpl.h"
+#define USB_MASS_TRANSPORT_COUNT 3
//
// Array of USB transport interfaces.
//
-USB_MASS_TRANSPORT *mUsbMassTransport[] = {
+USB_MASS_TRANSPORT *mUsbMassTransport[USB_MASS_TRANSPORT_COUNT] = {
&mUsbCbi0Transport,
&mUsbCbi1Transport,
&mUsbBotTransport,
- NULL
};
EFI_DRIVER_BINDING_PROTOCOL gUSBMassDriverBinding = {
@@ -424,7 +424,7 @@ UsbMassInitTransport ( // If not found, return EFI_UNSUPPORTED.
// If found, execute USB_MASS_TRANSPORT.Init() to initialize the transport context.
//
- for (Index = 0; mUsbMassTransport[Index] != NULL; Index++) {
+ for (Index = 0; Index < USB_MASS_TRANSPORT_COUNT; Index++) {
*Transport = mUsbMassTransport[Index];
if (Interface.InterfaceProtocol == (*Transport)->Protocol) {
@@ -780,7 +780,7 @@ USBMassDriverBindingSupported ( // If not found, return EFI_UNSUPPORTED.
// If found, execute USB_MASS_TRANSPORT.Init() to initialize the transport context.
//
- for (Index = 0; mUsbMassTransport[Index] != NULL; Index++) {
+ for (Index = 0; Index < USB_MASS_TRANSPORT_COUNT; Index++) {
Transport = mUsbMassTransport[Index];
if (Interface.InterfaceProtocol == Transport->Protocol) {
Status = Transport->Init (UsbIo, NULL);
|