diff options
Diffstat (limited to 'MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c')
-rw-r--r-- | MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c b/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c index 1714ebab71..ef9d35de9f 100644 --- a/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c +++ b/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c @@ -310,7 +310,7 @@ FindVariable ( PtrTrack->StartPtr = (VARIABLE_HEADER *) (VariableStoreHeader[Index] + 1);
PtrTrack->EndPtr = GetEndPointer (VariableStoreHeader[Index]);
- while ((Variable[Index] != NULL) && (Variable[Index] <= GetEndPointer (VariableStoreHeader[Index]))) {
+ while ((Variable[Index] < GetEndPointer (VariableStoreHeader[Index])) && (Variable[Index] != NULL)) {
if (Variable[Index]->StartId == VARIABLE_DATA && Variable[Index]->State == VAR_ADDED) {
if (!(EfiAtRuntime () && ((Variable[Index]->Attributes & EFI_VARIABLE_RUNTIME_ACCESS) == 0))) {
if (VariableName[0] == 0) {
|