diff options
| author | Mark Rowe <mark@vector35.com> | 2026-05-07 08:55:56 -0700 |
|---|---|---|
| committer | Mark Rowe <mark@vector35.com> | 2026-05-11 10:00:01 -0700 |
| commit | 82f6cd81d2cc09abf4a3ad30e2ce4404ced050a3 (patch) | |
| tree | 8039ca66ee3e394121c1a8a48a2d734943ed1e8f | |
| parent | b05c5f837869582e89d235b57ad0ee5207039d2a (diff) | |
[Rust] Fix off-by-one accesses to operand lists within MediumLevelILInstruction::lift
This could result in a crash or incorrect data being read.
Fixes https://github.com/Vector35/binaryninja-api/issues/8155
| -rw-r--r-- | rust/src/medium_level_il/instruction.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rust/src/medium_level_il/instruction.rs b/rust/src/medium_level_il/instruction.rs index 17534b31..c1cd26a3 100644 --- a/rust/src/medium_level_il/instruction.rs +++ b/rust/src/medium_level_il/instruction.rs @@ -851,7 +851,7 @@ impl MediumLevelILInstruction { MemPhi(op) => Lifted::MemPhi(LiftedMemPhi { dest_memory: op.dest_memory, // TODO: Make a stronger type for this. - src_memory: self.get_operand_list(0), + src_memory: self.get_operand_list(1), }), VarSplit(op) => Lifted::VarSplit(op), SetVarSplit(op) => Lifted::SetVarSplit(LiftedSetVarSplit { @@ -977,7 +977,7 @@ impl MediumLevelILInstruction { ) .expect("Valid intrinsic"), params: self - .get_expr_list(3) + .get_expr_list(2) .iter() .map(|expr| expr.lift()) .collect(), |
