Skip to content

Commit

Permalink
Replace incorrect assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
flobernd committed Oct 30, 2024
1 parent fa4db5c commit 4db1608
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Decoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,10 @@ static ZyanStatus ZydisDecodeMVEX(ZydisDecoderContext* context,
instruction->raw.mvex.W = (data[2] >> 7) & 0x01;
instruction->raw.mvex.vvvv = (data[2] >> 3) & 0x0F;

ZYAN_ASSERT(((data[2] >> 2) & 0x01) == 0x00);
if (((data[2] >> 2) & 0x01) != 0x00)
{
return ZYDIS_STATUS_MALFORMED_MVEX;
}

instruction->raw.mvex.pp = (data[2] >> 0) & 0x03;
instruction->raw.mvex.E = (data[3] >> 7) & 0x01;
Expand Down

0 comments on commit 4db1608

Please sign in to comment.