From 9c71771875b4bbea1a47f1327fa32875c31d57ce Mon Sep 17 00:00:00 2001 From: flobernd Date: Thu, 11 Jan 2018 02:39:43 +0100 Subject: [PATCH] Added missing `LOCK` prefix check for `3DNOW` encoded instructions --- src/Decoder.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Decoder.c b/src/Decoder.c index 0d7a652..5c1f6c7 100644 --- a/src/Decoder.c +++ b/src/Decoder.c @@ -3660,6 +3660,10 @@ static ZydisStatus ZydisNodeHandlerOpcode(ZydisDecoderContext* context, switch (instruction->opcode) { case 0x0F: + if (instruction->raw.prefixes.hasF0) + { + return ZYDIS_STATUS_ILLEGAL_LOCK; + } instruction->encoding = ZYDIS_INSTRUCTION_ENCODING_3DNOW; instruction->opcodeMap = ZYDIS_OPCODE_MAP_0F0F; break;