Ghidra is a software reverse engineering (SRE) framework
GP-6315 Quick fix for stack depth and function effects not propogating across indirect windows external calls
emteereb473d933a597
diff --git a/Ghidra/Features/Base/src/main/java/ghidra/program/util/SymbolicPropogator.java b/Ghidra/Features/Base/src/main/java/ghidra/program/util/SymbolicPropogator.javaindex 357f62d1c8..301d84edbb 100644--- a/Ghidra/Features/Base/src/main/java/ghidra/program/util/SymbolicPropogator.java+++ b/Ghidra/Features/Base/src/main/java/ghidra/program/util/SymbolicPropogator.java@@ -1006,12 +1006,20 @@ public class SymbolicPropogator {if (refs.length <= 0 ||!refs[0].getToAddress().equals(target)) {+ Address oldTarget = target;target = makeReference(vContext, instruction, Reference.MNEMONIC,// Use target in case location has shifted (external...)target.getAddressSpace().getSpaceID(),target.getAddressableWordOffset(), val1.getSize(),null,instruction.getFlowType(), ptype, !suspectOffset, false, monitor);+ if (target == null) {+ // Target was nulled out, restore old target.+ // Need to handle function call side-effects even if didn't make a reference+ // The target can be changed by makeReference(), but if it is nulled out, then+ // it indicates the reference was already made.+ target = oldTarget;+ }}}}