Base = PeCoffLoaderImageAddress (ImageContext, Section->VirtualAddress);\r
End = PeCoffLoaderImageAddress (\r
ImageContext,\r
- Section->VirtualAddress + Section->Misc.VirtualSize - 1\r
+ Section->VirtualAddress + Section->SizeOfRawData - 1\r
);\r
if (ImageContext->IsTeImage) {\r
Base = (CHAR8 *) ((UINTN) Base + sizeof (EFI_TE_IMAGE_HEADER) - (UINTN) TeHdr->StrippedSize);\r