Merge remote-tracking branch 'origin/patch'

This commit is contained in:
Ryan Kurtz
2024-03-05 06:20:47 -05:00

View File

@@ -15,16 +15,17 @@
*/
package ghidra.app.plugin.match;
import java.util.*;
import generic.stl.Pair;
import ghidra.program.model.address.*;
import ghidra.program.model.listing.*;
import ghidra.program.model.mem.MemoryAccessException;
import ghidra.util.Msg;
import ghidra.util.exception.CancelledException;
import ghidra.util.search.trie.*;
import ghidra.util.task.TaskMonitor;
import java.util.*;
public class MatchData {
private MatchData() {
// non-instantiable
@@ -80,7 +81,10 @@ public class MatchData {
bytes = aData.getBytes();
}
catch (MemoryAccessException e) {
throw new RuntimeException(e);
// if all the bytes for this data cannot be accessed then skip it
Msg.warn(MatchData.class, "Cannot process data at " + aData.getAddress() +
" because it runs into uninitialized memory.");
continue;
}
byte first = bytes[0];
for (int ii = 1; ii < bytes.length; ++ii) {
@@ -97,7 +101,10 @@ public class MatchData {
bytes = aData.getBytes();
}
catch (MemoryAccessException e) {
throw new RuntimeException(e);
// if all the bytes for this data cannot be accessed then skip it
Msg.warn(MatchData.class, "Cannot process data at " +
aData.getAddress() + " because it runs into uninitialized memory.");
continue;
}
}
ByteTrieNodeIfc<Pair<Set<Address>, Set<Address>>> node = trie.find(bytes);