mirror of https://github.com/acidanthera/audk.git
enhanced security check.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7516 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
b518ea4e87
commit
db0bd81c85
|
@ -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);
|
||||
|
|
|
@ -82,7 +82,7 @@ LIST_ENTRY mMappingDataBase = INITIALIZE_LIST_HEAD_VARIABLE (m
|
|||
EFI_HANDLE *mDevicePathHandleBuffer;
|
||||
EFI_HANDLE *mDriverImageHandleBuffer;
|
||||
|
||||
UINTN mSelectedCtrIndex;
|
||||
INTN mSelectedCtrIndex;
|
||||
EFI_STRING_ID mControllerToken[MAX_CHOICE_NUM];
|
||||
UINTN mDriverImageHandleCount;
|
||||
EFI_STRING_ID mDriverImageToken[MAX_CHOICE_NUM];
|
||||
|
@ -630,7 +630,8 @@ UpdateBindingDriverSelectPage (
|
|||
// Switch the item callback key value to its NO. in mDevicePathHandleBuffer
|
||||
//
|
||||
mSelectedCtrIndex = KeyValue - KEY_VALUE_DEVICE_OFFSET;
|
||||
ASSERT (mSelectedCtrIndex < MAX_CHOICE_NUM);
|
||||
ASSERT (mSelectedCtrIndex > 0 && mSelectedCtrIndex < MAX_CHOICE_NUM);
|
||||
|
||||
mLastSavedDriverImageNum = 0;
|
||||
//
|
||||
// Clear all the content in dynamic page
|
||||
|
@ -927,6 +928,7 @@ UpdatePrioritySelectPage (
|
|||
// Check the driver DriverImage's order number in mapping database
|
||||
//
|
||||
DriverImageNO = 0;
|
||||
ASSERT (mSelectedCtrIndex < MAX_CHOICE_NUM);
|
||||
CheckMapping (
|
||||
mControllerDevicePathProtocol[mSelectedCtrIndex],
|
||||
LoadedImageDevicePath,
|
||||
|
@ -1027,6 +1029,7 @@ CommintChanges (
|
|||
// Following code will be run if user select 'commint changes' in third page
|
||||
// user enter 'Commit Changes' to save the mapping database
|
||||
//
|
||||
ASSERT (mSelectedCtrIndex < MAX_CHOICE_NUM);
|
||||
DeleteDriverImage (mControllerDevicePathProtocol[mSelectedCtrIndex], NULL, &mMappingDataBase);
|
||||
for (SelectedDriverImageNum = 0; SelectedDriverImageNum < mSelectedDriverImageNum; SelectedDriverImageNum++) {
|
||||
//
|
||||
|
|
|
@ -188,8 +188,8 @@ DisplayPageFrame (
|
|||
CHAR16 *StrFrontPageBanner;
|
||||
UINTN Row;
|
||||
EFI_SCREEN_DESCRIPTOR LocalScreen;
|
||||
UINTN RowIdx;
|
||||
UINTN ColumnIdx;
|
||||
UINT8 RowIdx;
|
||||
UINT8 ColumnIdx;
|
||||
|
||||
ZeroMem (&LocalScreen, sizeof (EFI_SCREEN_DESCRIPTOR));
|
||||
gST->ConOut->QueryMode (gST->ConOut, gST->ConOut->Mode->Mode, &LocalScreen.RightColumn, &LocalScreen.BottomRow);
|
||||
|
|
|
@ -2166,7 +2166,8 @@ GetIfrBinaryData (
|
|||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
ASSERT (HiiPackageList != NULL);
|
||||
|
||||
//
|
||||
// Get Form package from this HII package List
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue