summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Core/Pei
diff options
context:
space:
mode:
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2010-03-01 08:59:00 +0000
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2010-03-01 08:59:00 +0000
commitccf0f68d732b9f1f9e8d78bc7d6a040d1ef90bc4 (patch)
treeb5450825cba94018f6b5c021112030247352315a /MdeModulePkg/Core/Pei
parent2292758d5cd7029df3f50c8c910ced45d65f7316 (diff)
downloadedk2-platforms-ccf0f68d732b9f1f9e8d78bc7d6a040d1ef90bc4.tar.xz
Add checking whether FvCount is overflow when new unknown FvInfoPpi is dispatched.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10146 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Core/Pei')
-rw-r--r--MdeModulePkg/Core/Pei/FwVol/FwVol.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/MdeModulePkg/Core/Pei/FwVol/FwVol.c b/MdeModulePkg/Core/Pei/FwVol/FwVol.c
index 30485a836c..6892d22a42 100644
--- a/MdeModulePkg/Core/Pei/FwVol/FwVol.c
+++ b/MdeModulePkg/Core/Pei/FwVol/FwVol.c
@@ -1606,6 +1606,12 @@ ThirdPartyFvPpiNotifyCallback (
continue;
}
+ if (PrivateData->FvCount >= FixedPcdGet32 (PcdPeiCoreMaxFvSupported)) {
+ DEBUG ((EFI_D_ERROR, "The number of Fv Images (%d) exceed the max supported FVs (%d) in Pei", PrivateData->FvCount + 1, FixedPcdGet32 (PcdPeiCoreMaxFvSupported)));
+ DEBUG ((EFI_D_ERROR, "PcdPeiCoreMaxFvSupported value need be reconfigurated in DSC"));
+ ASSERT (FALSE);
+ }
+
//
// Update internal PEI_CORE_FV array.
//