mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-09-28 17:11:11 -09:00
GP-2553 fix MemoryByteProvider's length() issues
Previously the impl would only return the length of the memory block where the byte provider started, or return 0 if there wasn't a memoryblock at the base address. Now returns the length of the available memory (in the same addressspace) that is found in the program's memory map, clamped to Long.MAX_VALUE. Updated users of MemoryByteProvider to use helper methods to create. Removed ISO9660 format analyzer (that was using MemorbyByteProvider) because we no longer have our own iso format code after switching to Sevenzip.
This commit is contained in:
@@ -34,8 +34,8 @@ public class PEUtil {
|
||||
return true;
|
||||
}
|
||||
if (format.equals(BinaryLoader.BINARY_NAME)) {
|
||||
MemoryByteProvider mbp = new MemoryByteProvider(program.getMemory(),
|
||||
program.getAddressFactory().getDefaultAddressSpace());
|
||||
MemoryByteProvider mbp =
|
||||
MemoryByteProvider.createDefaultAddressSpaceByteProvider(program, false);
|
||||
try {
|
||||
BinaryReader reader = new BinaryReader(mbp, true/*LittleEndian*/);
|
||||
DOSHeader dosHeader = new DOSHeader(reader);
|
||||
|
||||
Reference in New Issue
Block a user