mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-29 02:29:50 +08:00
GP-803 fixed emulation of binary ops with large 2nd input
This commit is contained in:
@@ -475,8 +475,9 @@ public class Emulate {
|
|||||||
else if (behave instanceof BinaryOpBehavior) {
|
else if (behave instanceof BinaryOpBehavior) {
|
||||||
BinaryOpBehavior binaryBehave = (BinaryOpBehavior) behave;
|
BinaryOpBehavior binaryBehave = (BinaryOpBehavior) behave;
|
||||||
Varnode in1var = op.getInput(0);
|
Varnode in1var = op.getInput(0);
|
||||||
|
Varnode in2var = op.getInput(1);
|
||||||
Varnode outvar = op.getOutput();
|
Varnode outvar = op.getOutput();
|
||||||
if (in1var.getSize() > 8 || outvar.getSize() > 8) {
|
if (in1var.getSize() > 8 || in2var.getSize() > 8 || outvar.getSize() > 8) {
|
||||||
BigInteger in1 = memstate.getBigInteger(op.getInput(0), false);
|
BigInteger in1 = memstate.getBigInteger(op.getInput(0), false);
|
||||||
BigInteger in2 = memstate.getBigInteger(op.getInput(1), false);
|
BigInteger in2 = memstate.getBigInteger(op.getInput(1), false);
|
||||||
BigInteger out = binaryBehave.evaluateBinary(outvar.getSize(),
|
BigInteger out = binaryBehave.evaluateBinary(outvar.getSize(),
|
||||||
|
|||||||
Reference in New Issue
Block a user