Fixed MVEX.SSS error-condition

This commit is contained in:
flobernd 2017-06-20 22:56:25 +02:00
parent d475231a63
commit 6ff954f585
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}