mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-03 09:49:23 +02: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:
parent
2113bdc8b1
commit
14f5cf93da
58 changed files with 775 additions and 2295 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue