From e0192326ae23083b14c2502314dc3a4809528efa Mon Sep 17 00:00:00 2001 From: ydong10 Date: Thu, 26 Apr 2012 01:50:34 +0000 Subject: Patch include: 1.Change function name to avoid name conflict. 2.Refine check for Pe Image. Signed-off-by: Eric Dong Reviewed-by: Liming Gao git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13220 6f19259b-4bc3-4df7-8a09-765794883524 --- MdePkg/Library/BasePeCoffLib/BasePeCoff.c | 8 -------- 1 file changed, 8 deletions(-) (limited to 'MdePkg') diff --git a/MdePkg/Library/BasePeCoffLib/BasePeCoff.c b/MdePkg/Library/BasePeCoffLib/BasePeCoff.c index 6342a665df..69c649a32a 100644 --- a/MdePkg/Library/BasePeCoffLib/BasePeCoff.c +++ b/MdePkg/Library/BasePeCoffLib/BasePeCoff.c @@ -144,10 +144,6 @@ PeCoffLoaderGetPeHeader ( return RETURN_UNSUPPORTED; } - if (Hdr.Pe32->FileHeader.SizeOfOptionalHeader != sizeof (EFI_IMAGE_OPTIONAL_HEADER32) - (EFI_IMAGE_NUMBER_OF_DIRECTORY_ENTRIES - Hdr.Pe32->OptionalHeader.NumberOfRvaAndSizes) * sizeof (EFI_IMAGE_DATA_DIRECTORY)) { - return RETURN_UNSUPPORTED; - } - // // 2. Check the OptionalHeader.SizeOfHeaders field. // This field will be use like the following mode, so just compare the result. @@ -221,10 +217,6 @@ PeCoffLoaderGetPeHeader ( return RETURN_UNSUPPORTED; } - if (Hdr.Pe32Plus->FileHeader.SizeOfOptionalHeader != sizeof (EFI_IMAGE_OPTIONAL_HEADER32) - (EFI_IMAGE_NUMBER_OF_DIRECTORY_ENTRIES - Hdr.Pe32Plus->OptionalHeader.NumberOfRvaAndSizes) * sizeof (EFI_IMAGE_DATA_DIRECTORY)) { - return RETURN_UNSUPPORTED; - } - // // 2. Check the OptionalHeader.SizeOfHeaders field. // This field will be use like the following mode, so just compare the result. -- cgit v1.2.3