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
This commit is contained in:
klu2 2010-03-01 08:59:00 +00:00
parent 2292758d5c
commit ccf0f68d73
1 changed files with 6 additions and 0 deletions

View File

@ -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.
//