mirror of https://github.com/acidanthera/audk.git
Compute the end address of a section read from a file using the SizeOfRawData instead of VirtualSize, because the PE/COFF image format allows the SizeOfRawData to be smaller then VirtualSize.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1563 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
928fbe8f1c
commit
202515b47d
|
@ -858,7 +858,7 @@ Returns:
|
|||
Base = PeCoffLoaderImageAddress (ImageContext, Section->VirtualAddress);
|
||||
End = PeCoffLoaderImageAddress (
|
||||
ImageContext,
|
||||
Section->VirtualAddress + Section->Misc.VirtualSize - 1
|
||||
Section->VirtualAddress + Section->SizeOfRawData - 1
|
||||
);
|
||||
if (ImageContext->IsTeImage) {
|
||||
Base = (CHAR8 *) ((UINTN) Base + sizeof (EFI_TE_IMAGE_HEADER) - (UINTN) TeHdr->StrippedSize);
|
||||
|
|
Loading…
Reference in New Issue