diff options
-rw-r--r-- | MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c | 2 | ||||
-rw-r--r-- | MdeModulePkg/Universal/SetupBrowserDxe/IfrParse.c | 15 |
2 files changed, 9 insertions, 8 deletions
diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c index 69b740ad5b..0b2138ce64 100644 --- a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c @@ -1287,7 +1287,7 @@ IsThisVarstore ( //
// If ConfigHdr has name field and varstore not has name, return FALSE.
//
- if (Name == NULL && StrStr (ConfigHdr, L"NAME=&") == NULL) {
+ if (Name == NULL && ConfigHdr != NULL && StrStr (ConfigHdr, L"NAME=&") == NULL) {
return FALSE;
}
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/IfrParse.c b/MdeModulePkg/Universal/SetupBrowserDxe/IfrParse.c index ce2ba6fab2..75947d302e 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/IfrParse.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/IfrParse.c @@ -379,12 +379,18 @@ FindStorageInList ( Link = GetFirstNode (&gBrowserStorageList);
while (!IsNull (&gBrowserStorageList, Link)) {
BrowserStorage = BROWSER_STORAGE_FROM_LINK (Link);
+ Link = GetNextNode (&gBrowserStorageList, Link);
if ((BrowserStorage->Type == StorageType) && CompareGuid (&BrowserStorage->Guid, StorageGuid)) {
- if (StorageType == EFI_HII_VARSTORE_NAME_VALUE && BrowserStorage->HiiHandle == HiiHandle) {
- return BrowserStorage;
+ if (StorageType == EFI_HII_VARSTORE_NAME_VALUE) {
+ if (BrowserStorage->HiiHandle == HiiHandle) {
+ return BrowserStorage;
+ }
+
+ continue;
}
+ ASSERT (StorageName != NULL);
if (StrCmp (BrowserStorage->Name, StorageName) == 0) {
if (StorageType == EFI_HII_VARSTORE_EFI_VARIABLE || StorageType == EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER) {
return BrowserStorage;
@@ -393,11 +399,6 @@ FindStorageInList ( }
}
}
-
- //
- // Get Next Storage.
- //
- Link = GetNextNode (&gBrowserStorageList, Link);
}
return NULL;
|