Skip to content

Ghidra is a software reverse engineering (SRE) framework

fix to let equate symbols survive deindirect

caheckmanfc053ad50f70
diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/fspec.cc b/Ghidra/Features/Decompiler/src/decompile/cpp/fspec.cc
index d0fd7f6242..e7fd783be2 100644
--- a/Ghidra/Features/Decompiler/src/decompile/cpp/fspec.cc
+++ b/Ghidra/Features/Decompiler/src/decompile/cpp/fspec.cc
@@ -4088,7 +4088,7 @@ Varnode *FuncCallSpecs::buildParam(Funcdata &data,Varnode *vn,ProtoParameter *pa
Varnode *newout = data.newUniqueOut(param->getSize(),newop);
// Its possible vn is free, in which case the SetInput would give it multiple descendants
// See we construct a new version
- if (vn->isFree() && (!vn->hasNoDescend()))
+ if (vn->isFree() && !vn->isConstant() && !vn->hasNoDescend())
vn = data.newVarnode(vn->getSize(),vn->getAddr());
data.opSetInput(newop,vn,0);
data.opSetInput(newop,data.newConstant(4,0),1);