Ghidra is a software reverse engineering (SRE) framework
GP-3700: Fix indirect branching operand size mismatch.
Dand26fb9911e99
diff --git a/Ghidra/Framework/Emulation/src/main/java/ghidra/pcode/exec/PcodeExecutor.java b/Ghidra/Framework/Emulation/src/main/java/ghidra/pcode/exec/PcodeExecutor.javaindex 0e52acdeee..a5ce01bc07 100644--- a/Ghidra/Framework/Emulation/src/main/java/ghidra/pcode/exec/PcodeExecutor.java+++ b/Ghidra/Framework/Emulation/src/main/java/ghidra/pcode/exec/PcodeExecutor.java@@ -411,7 +411,9 @@ public class PcodeExecutor<T> {* @param frame the frame to finish*/protected void branchToOffset(T offset, PcodeFrame frame) {- state.setVar(pc, offset);+ T truncOff = arithmetic.unaryOp(PcodeOp.COPY, pc.getMinimumByteSize(),+ (int) arithmetic.sizeOf(offset), offset);+ state.setVar(pc, truncOff);frame.finishAsBranch();}