aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/shared/evex.in3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/shared/evex.in b/src/shared/evex.in
index 837b867..58ec14a 100644
--- a/src/shared/evex.in
+++ b/src/shared/evex.in
@@ -2810,6 +2810,9 @@ pub(crate) fn read_evex_operands<
if mem_oper == OperandSpec::RegMMM {
instruction.mem_size = 0;
instruction.regs[0].bank = RegisterBank::K;
+ if instruction.regs[0].num > 7 {
+ return Err(DecodeError::InvalidOperand);
+ }
} else {
return Err(DecodeError::InvalidOperand);
}