GP-1949 corrected findBytes bug

This commit is contained in:
ghidra1
2022-05-03 10:18:48 -04:00
parent 5be1971ecf
commit afb63d811c
2 changed files with 1 additions and 2 deletions

View File

@@ -1221,7 +1221,7 @@ public class MemoryMapDB implements Memory, ManagerDB, LiveMemoryListener {
if (monitor == null) { if (monitor == null) {
monitor = TaskMonitor.DUMMY; monitor = TaskMonitor.DUMMY;
} }
AddressSetView set = getLoadedAndInitializedAddressSet(); AddressSetView set = getAllInitializedAddressSet();
AddressIterator it = set.getAddresses(startAddr, forward); AddressIterator it = set.getAddresses(startAddr, forward);
byte[] b = new byte[bytes.length]; byte[] b = new byte[bytes.length];
if (forward) { if (forward) {

View File

@@ -433,7 +433,6 @@ public interface Memory extends AddressSetView {
* Finds a sequence of contiguous bytes that match the * Finds a sequence of contiguous bytes that match the
* given byte array at all bit positions where the mask contains an "on" bit. * given byte array at all bit positions where the mask contains an "on" bit.
* Starts at startAddr and ends at endAddr. * Starts at startAddr and ends at endAddr.
* Search is performed over loaded memory only.
* If forward is true, search starts at startAddr and will end if startAddr ">" endAddr. * If forward is true, search starts at startAddr and will end if startAddr ">" endAddr.
* If forward is false, search starts at start addr and will end if startAddr "<" endAddr. * If forward is false, search starts at start addr and will end if startAddr "<" endAddr.
* *