]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Source/TianoTools/PeCoffLoader/BasePeCoff.c
Compute the end address of a section read from a file using the SizeOfRawData instead...
[mirror_edk2.git] / Tools / Source / TianoTools / PeCoffLoader / BasePeCoff.c
index 9c25e1f4b8f1162f7b60ae5b85efb606eed657b9..556b2d73c9575a8f06078676f7938ce52e8790a2 100644 (file)
@@ -858,7 +858,7 @@ Returns:
     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