summaryrefslogtreecommitdiff
path: root/IntelFrameworkModulePkg/Universal
diff options
context:
space:
mode:
Diffstat (limited to 'IntelFrameworkModulePkg/Universal')
-rw-r--r--IntelFrameworkModulePkg/Universal/VariablePei/Variable.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/IntelFrameworkModulePkg/Universal/VariablePei/Variable.c b/IntelFrameworkModulePkg/Universal/VariablePei/Variable.c
index 844987bd0e..3a747846b3 100644
--- a/IntelFrameworkModulePkg/Universal/VariablePei/Variable.c
+++ b/IntelFrameworkModulePkg/Universal/VariablePei/Variable.c
@@ -463,7 +463,7 @@ FindVariable (
PtrTrack->StartPtr = IndexTable->StartPtr;
PtrTrack->EndPtr = IndexTable->EndPtr;
- while (IsValidVariableHeader (Variable) && (Variable <= IndexTable->EndPtr)) {
+ while ((Variable < IndexTable->EndPtr) && IsValidVariableHeader (Variable)) {
if (Variable->State == VAR_ADDED) {
//
// Record Variable in VariableIndex HOB