mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-06-02 16:59:49 +08:00
Merge remote-tracking branch 'origin/GP-6442_emteere_SpuriousJumpCallReferences' into patch
This commit is contained in:
@@ -485,6 +485,9 @@ public class SymbolicPropogator {
|
||||
visitedBody = new AddressSet();
|
||||
AddressSet conflicts = new AddressSet();
|
||||
|
||||
// Locations that were jump and are now call targets and might be on saved future flows
|
||||
HashSet<Address> doNotFlowTo = new HashSet<>();
|
||||
|
||||
// prime the context stack with the entry point address
|
||||
Stack<SavedFlowState> contextStack = new Stack<>();
|
||||
contextStack.push(new SavedFlowState(vContext, null, fromAddr, startAddr, NOT_CONTINUING_CURRRENTLY));
|
||||
@@ -537,6 +540,11 @@ public class SymbolicPropogator {
|
||||
}
|
||||
}
|
||||
|
||||
// don't follow flow if on list of jump targets that were turned into calls
|
||||
if (doNotFlowTo.contains(nextAddr)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
HashSet<Address> visitSet = visitedMap.get(nextAddr);
|
||||
if (visitSet != null) {
|
||||
// already flowed to nextAddr from flowFromAddr
|
||||
@@ -636,6 +644,9 @@ public class SymbolicPropogator {
|
||||
Address targets[] = getInstructionFlows(instr);
|
||||
for (Address target : targets) {
|
||||
handleFunctionSideEffects(instr, target, monitor);
|
||||
// a jump target has already been pushed as a future flow trace
|
||||
// need to make sure values aren't propagated into the call targets
|
||||
doNotFlowTo.add(target);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user