From: Liming Gao Date: Wed, 13 Jul 2016 12:28:18 +0000 (+0800) Subject: SecurityPkg DxeImageVerificationLib: Add comments in HashPeImage() X-Git-Tag: edk2-stable201903~6308 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=89fb5aef411587661c9a1c00645d46adf76b2fb2 SecurityPkg DxeImageVerificationLib: Add comments in HashPeImage() The input PeImage in HashPeImage() has been checked. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao Reviewed-by: Jiewen Yao Reviewed-by: Chao Zhang --- diff --git a/SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c b/SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c index 3aef1af760..7b7e6af784 100644 --- a/SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c +++ b/SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c @@ -275,11 +275,14 @@ GetImageType ( /** Calculate hash of Pe/Coff image based on the authenticode image hashing in PE/COFF Specification 8.0 Appendix A - + Caution: This function may receive untrusted input. PE/COFF image is external input, so this function will validate its data structure within this image buffer before use. + Notes: PE/COFF image has been checked by BasePeCoffLib PeCoffLoaderGetImageInfo() in + its caller function DxeImageVerificationHandler(). + @param[in] HashAlg Hash algorithm type. @retval TRUE Successfully hash image.