diff options
author | iximeow <me@iximeow.net> | 2021-07-03 15:51:22 -0700 |
---|---|---|
committer | iximeow <me@iximeow.net> | 2021-07-03 15:51:22 -0700 |
commit | 7e154da8e2bd7b8892bdefe2f71c111c2135b0a3 (patch) | |
tree | b1b945803f37c48a7dd7e5a23e0656ee1d9c83b9 /src/protected_mode/vex.rs | |
parent | 582c4e44579d4bbb9dcec9d12c23c8b774db3cfb (diff) |
be more strict about denying invalid operands
Diffstat (limited to 'src/protected_mode/vex.rs')
-rw-r--r-- | src/protected_mode/vex.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/protected_mode/vex.rs b/src/protected_mode/vex.rs index 7c55ef1..36ccc66 100644 --- a/src/protected_mode/vex.rs +++ b/src/protected_mode/vex.rs @@ -1528,7 +1528,11 @@ fn read_vex_instruction<T: Reader<<Arch as yaxpeax_arch::Arch>::Address, <Arch a } else { VEXOperandCode::G_V_E_xmm }), - 0x16 => (Opcode::VMOVHPD, VEXOperandCode::G_V_M_xmm), + 0x16 => (Opcode::VMOVHPD, if L { + return Err(DecodeError::InvalidOpcode); + } else { + VEXOperandCode::G_V_M_xmm + }), 0x17 => (Opcode::VMOVHPD, if L { instruction.opcode = Opcode::Invalid; return Err(DecodeError::InvalidOpcode); |