From ccf0f68d732b9f1f9e8d78bc7d6a040d1ef90bc4 Mon Sep 17 00:00:00 2001 From: klu2 Date: Mon, 1 Mar 2010 08:59:00 +0000 Subject: 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 --- MdeModulePkg/Core/Pei/FwVol/FwVol.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'MdeModulePkg/Core/Pei') 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. // -- cgit v1.2.3