mirror of https://github.com/x64dbg/zydis
fixed data source position not beeing correct if the end of the input was reached while decoding an invalid instruction
This commit is contained in:
parent
a4b07c6f83
commit
48fd678632
|
@ -1773,14 +1773,6 @@ DecodeError:
|
||||||
info->instrAddress = instrAddress;
|
info->instrAddress = instrAddress;
|
||||||
info->instrDefinition = VXGetInstructionDefinition(0);
|
info->instrDefinition = VXGetInstructionDefinition(0);
|
||||||
|
|
||||||
// Return with error, if the end of the input source was reached while decoding the
|
|
||||||
// invalid instruction
|
|
||||||
if (info->flags & IF_ERROR_END_OF_INPUT)
|
|
||||||
{
|
|
||||||
info->length = 0;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Decrement the input position, if more than one byte was read from the input data
|
// Decrement the input position, if more than one byte was read from the input data
|
||||||
// source while decoding the invalid instruction
|
// source while decoding the invalid instruction
|
||||||
if (info->length != 1)
|
if (info->length != 1)
|
||||||
|
@ -1790,6 +1782,14 @@ DecodeError:
|
||||||
info->length = 1;
|
info->length = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Return with error, if the end of the input source was reached while decoding the
|
||||||
|
// invalid instruction
|
||||||
|
if (info->flags & IF_ERROR_END_OF_INPUT)
|
||||||
|
{
|
||||||
|
info->length = 0;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue