From 44c3b6b2b07b0d2c96bc043b19d69e97b924a816 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joel=20H=C3=B6ner?= Date: Tue, 8 Dec 2015 19:19:34 +0100 Subject: [PATCH] fixed invalid array access - an invalid array access could crash on decoding some 3D-Now instructions --- Zydis/ZydisInstructionDecoder.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Zydis/ZydisInstructionDecoder.cpp b/Zydis/ZydisInstructionDecoder.cpp index de0bb9c..3566aa9 100644 --- a/Zydis/ZydisInstructionDecoder.cpp +++ b/Zydis/ZydisInstructionDecoder.cpp @@ -6,7 +6,7 @@ Remarks : Freeware, Copyright must be included Original Author : Florian Bernd - Modifications : Joel Höner + Modifications : Joel Höner * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -1120,7 +1120,7 @@ bool InstructionDecoder::decodeOpcode(InstructionInfo& info) { if (info.operand[i].type != OperandType::NONE) { - info.operand[i - 1].access_mode = OperandAccessMode::READ; + info.operand[i].access_mode = OperandAccessMode::READ; } } if (info.operand[0].type != OperandType::NONE) @@ -1313,4 +1313,4 @@ DecodeError: /* ============================================================================================== */ -} \ No newline at end of file +}