diff options
author | iximeow <me@iximeow.net> | 2021-07-03 09:41:31 -0700 |
---|---|---|
committer | iximeow <me@iximeow.net> | 2021-07-03 09:41:31 -0700 |
commit | 77efbb834a5119b93e656dce6189f36df89645bb (patch) | |
tree | 5b7db1be63a6a904e41748df71e17ebce06860b4 /src/shared/evex.in | |
parent | 8b4de9092947380e8602766f64af4081c89b29d7 (diff) |
reject instructions when their opcode is `Invalid`
the evex route would allow "valid" instructions that have the opcode
`invalid`. this is.. not correct.
Diffstat (limited to 'src/shared/evex.in')
-rw-r--r-- | src/shared/evex.in | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/shared/evex.in b/src/shared/evex.in index 2bcd2f4..f9574db 100644 --- a/src/shared/evex.in +++ b/src/shared/evex.in @@ -86,6 +86,9 @@ pub(crate) fn read_evex<T: Reader<<Arch as yaxpeax_arch::Arch>::Address, <Arch a } instruction.prefixes.apply_compressed_disp(false); } + if instruction.opcode == Opcode::Invalid { + return Err(DecodeError::InvalidOpcode); + } // TODO: apply rp and bp? } else { return Err(DecodeError::InvalidOpcode); |