From 26d39cc7f056e3700e6aaf3d007e936be95bb6ff Mon Sep 17 00:00:00 2001 From: flobernd Date: Mon, 12 Jun 2017 21:07:43 +0200 Subject: [PATCH] Fixed XOP decoding --- src/Decoder.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Decoder.c b/src/Decoder.c index c840262..430d5d9 100644 --- a/src/Decoder.c +++ b/src/Decoder.c @@ -1397,11 +1397,11 @@ static ZydisStatus ZydisNodeHandlerOpcode(ZydisDecoderContext* context, { return ZYDIS_STATUS_ILLEGAL_LEGACY_PFX; } - uint8_t prefixBytes[2]; + uint8_t prefixBytes[3] = { 0x8F, 0x00, 0x00 }; // Read additional xop-prefix data ZYDIS_ASSERT(!info->details.xop.isDecoded); - ZYDIS_CHECK(ZydisInputNext(context, info, &prefixBytes[0])); ZYDIS_CHECK(ZydisInputNext(context, info, &prefixBytes[1])); + ZYDIS_CHECK(ZydisInputNext(context, info, &prefixBytes[2])); // Decode xop-prefix info->encoding = ZYDIS_INSTRUCTION_ENCODING_XOP; ZYDIS_CHECK(ZydisDecodeXOP(context, info, prefixBytes));