diff options
Diffstat (limited to 'src/armv7')
-rw-r--r-- | src/armv7/thumb.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/armv7/thumb.rs b/src/armv7/thumb.rs index 8017f01..e721691 100644 --- a/src/armv7/thumb.rs +++ b/src/armv7/thumb.rs @@ -2956,6 +2956,9 @@ pub fn decode_into<T: Reader<<ARMv7 as Arch>::Address, <ARMv7 as Arch>::Word>>(d return Err(DecodeError::InvalidOpcode); } + if op1 == 0 { + return Err(DecodeError::InvalidOpcode); + } let opcode_idx = (op1 - 1) * 3 + op2; let rn = instr2[0..4].load::<u8>(); |