summaryrefslogtreecommitdiff
path: root/MdeModulePkg
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Universal/Variable/Pei/Variable.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/MdeModulePkg/Universal/Variable/Pei/Variable.c b/MdeModulePkg/Universal/Variable/Pei/Variable.c
index 4716eac9ec..8ceebedd15 100644
--- a/MdeModulePkg/Universal/Variable/Pei/Variable.c
+++ b/MdeModulePkg/Universal/Variable/Pei/Variable.c
@@ -403,6 +403,7 @@ FindVariable (
// traverse the variable info list to look for varible.
// The IndexTable->Index[Count] records the distance of two neighbouring VAR_ADDED type variables.
//
+ ASSERT (Count < VARIABLE_INDEX_TABLE_VOLUME);
Offset += IndexTable->Index[Count];
MaxIndex = (VARIABLE_HEADER *)((CHAR8 *)(IndexTable->StartPtr) + Offset);
if (CompareWithValidVariable (MaxIndex, VariableName, VendorGuid, PtrTrack) == EFI_SUCCESS) {