MdeModulePkg DxeCore: Add FVH signature check before VerifyFvHeaderChecksum in FwVol.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16200 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Star Zeng 2014-10-09 09:37:58 +00:00 committed by lzeng14
parent 65ef0b0d01
commit d2a867217d
1 changed files with 8 additions and 0 deletions

View File

@ -658,6 +658,14 @@ NotifyFwVolBlock (
}
ASSERT (FwVolHeader != NULL);
//
// Validate FV Header signature, if not as expected, continue.
//
if (FwVolHeader->Signature != EFI_FVH_SIGNATURE) {
CoreFreePool (FwVolHeader);
continue;
}
if (!VerifyFvHeaderChecksum (FwVolHeader)) {
CoreFreePool (FwVolHeader);
continue;