mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-06-01 06:46:13 +08:00
GT-3344: Fixed exception in PeLoader that occurred when creating a
memory block for the headers when the block size exceeded the file size (fixes #1266).
This commit is contained in:
@@ -612,7 +612,7 @@ public class PeLoader extends AbstractPeDebugLoader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Header block
|
// Header block
|
||||||
int virtualSize = getVirtualSize(pe, sections, space);
|
int virtualSize = (int) Math.min(getVirtualSize(pe, sections, space), fileBytes.getSize());
|
||||||
long addr = optionalHeader.getImageBase();
|
long addr = optionalHeader.getImageBase();
|
||||||
Address address = space.getAddress(addr);
|
Address address = space.getAddress(addr);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user