Skip to content

Ghidra is a software reverse engineering (SRE) framework

tailor application of RulePullsubIndirect

caheckman47290cc0f843
diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/ruleaction.cc b/Ghidra/Features/Decompiler/src/decompile/cpp/ruleaction.cc
index 3fa75b05d7..1e453ad4f8 100644
--- a/Ghidra/Features/Decompiler/src/decompile/cpp/ruleaction.cc
+++ b/Ghidra/Features/Decompiler/src/decompile/cpp/ruleaction.cc
@@ -1012,6 +1012,10 @@ int4 RulePullsubIndirect::applyOp(PcodeOp *op,Funcdata &data)
Varnode *outvn = op->getOut();
if (outvn->isPrecisLo()||outvn->isPrecisHi()) return 0; // Don't pull apart double precision object
+ uintb consume = calc_mask(newSize) << 8 * minByte;
+ consume = ~consume;
+ if ((consume & indir->getIn(0)->getConsume())!=0) return 0;
+
Varnode *small2;
Address smalladdr2;
PcodeOp *new_ind;