mirror of https://github.com/x64dbg/zydis
Fixed an issue where instructions with more than 15-bytes did not get rejected correctly
fixes #17
This commit is contained in:
parent
f230688af4
commit
867b6bc109
|
@ -320,7 +320,7 @@ static ZydisStatus ZydisInputNextBytes(ZydisDecoderContext* context,
|
|||
ZYDIS_ASSERT(instruction);
|
||||
ZYDIS_ASSERT(value);
|
||||
|
||||
if (instruction->length >= ZYDIS_MAX_INSTRUCTION_LENGTH)
|
||||
if (instruction->length + numberOfBytes > ZYDIS_MAX_INSTRUCTION_LENGTH)
|
||||
{
|
||||
return ZYDIS_STATUS_INSTRUCTION_TOO_LONG;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue