Added missing `LOCK` prefix check for `3DNOW` encoded instructions

This commit is contained in:
flobernd 2018-01-11 02:39:43 +01:00
parent 7fb7eea11f
commit 9c71771875
No known key found for this signature in database
GPG Key ID: 9C3AE0ED4A969F10
1 changed files with 4 additions and 0 deletions

View File

@ -3660,6 +3660,10 @@ static ZydisStatus ZydisNodeHandlerOpcode(ZydisDecoderContext* context,
switch (instruction->opcode) switch (instruction->opcode)
{ {
case 0x0F: case 0x0F:
if (instruction->raw.prefixes.hasF0)
{
return ZYDIS_STATUS_ILLEGAL_LOCK;
}
instruction->encoding = ZYDIS_INSTRUCTION_ENCODING_3DNOW; instruction->encoding = ZYDIS_INSTRUCTION_ENCODING_3DNOW;
instruction->opcodeMap = ZYDIS_OPCODE_MAP_0F0F; instruction->opcodeMap = ZYDIS_OPCODE_MAP_0F0F;
break; break;