Fixed semantic decoding of EIP/RIP-relative displacements

This commit is contained in:
flobernd 2017-06-24 03:02:03 +02:00
parent 83ea3bc2c8
commit e04adf2b8d
1 changed files with 2 additions and 2 deletions

View File

@ -1272,7 +1272,7 @@ static ZydisStatus ZydisDecodeOperandMemory(ZydisDecoderContext* context,
switch (info->details.modrm.mod)
{
case 0:
if (modrm_rm == 5)
if ((modrm_rm & 0x07) == 5)
{
if (context->decoder->machineMode == 64)
{
@ -1327,7 +1327,7 @@ static ZydisStatus ZydisDecodeOperandMemory(ZydisDecoderContext* context,
switch (info->details.modrm.mod)
{
case 0:
if (modrm_rm == 5)
if ((modrm_rm & 0x07) == 5)
{
operand->mem.base = ZYDIS_REGISTER_RIP;
displacementSize = 32;