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:
dev747368 2022-09-26 12:24:22 -04:00
parent 2113bdc8b1
commit 14f5cf93da
58 changed files with 775 additions and 2295 deletions

View file

@ -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);