Ghidra is a software reverse engineering (SRE) framework
fixed bug in OpBehaviorIntSrem::evaluteBinary
Jamesc047b7433f08
diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/opbehavior.cc b/Ghidra/Features/Decompiler/src/decompile/cpp/opbehavior.ccindex 07cc5d29e8..9c4d8fe253 100644--- a/Ghidra/Features/Decompiler/src/decompile/cpp/opbehavior.cc+++ b/Ghidra/Features/Decompiler/src/decompile/cpp/opbehavior.cc@@ -507,7 +507,7 @@ uintb OpBehaviorIntSrem::evaluateBinary(int4 sizeout,int4 sizein,uintb in1,uintbintb mod = in2;sign_extend(val,8*sizein-1); // Convert inputs to signed valuessign_extend(mod,8*sizein-1);- intb sres = in1 % in2; // Do the remainder+ intb sres = val % mod; // Do the remainderzero_extend(sres,8*sizeout-1); // Convert back to unsignedreturn (uintb)sres;}