From 6ff954f585d65cd9c6375eb162e693ecc733592d Mon Sep 17 00:00:00 2001 From: flobernd Date: Tue, 20 Jun 2017 22:56:25 +0200 Subject: [PATCH] Fixed MVEX.SSS error-condition --- src/Decoder.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Decoder.c b/src/Decoder.c index cbe63d0..9a78bd4 100644 --- a/src/Decoder.c +++ b/src/Decoder.c @@ -3189,7 +3189,8 @@ static ZydisStatus ZydisDecodeInstruction(ZydisDecoderContext* context, ZydisIns { 1, 0, 0, 0, 0, 0, 0, 0 } }; ZYDIS_ASSERT(def->functionality < ZYDIS_ARRAY_SIZE(lookup)); - if (!lookup[def->functionality]) + ZYDIS_ASSERT(info->details.mvex.SSS < 8); + if (!lookup[def->functionality][info->details.mvex.SSS]) { return ZYDIS_STATUS_DECODING_ERROR; }