Skip to content

Commit

Permalink
Workaround for xsha1/xsha256
Browse files Browse the repository at this point in the history
  • Loading branch information
mappzor committed Nov 6, 2024
1 parent 47b92fd commit e1b47b2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tools/ZydisFuzzReEncoding.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,14 @@ int ZydisFuzzTarget(ZydisStreamRead read_fn, void *stream_ctx)
{
return EXIT_FAILURE;
}
// TODO: Temporary workaround for `xsha1` and `xsha256` with OSIZE prefix
if (insn1.mnemonic == ZYDIS_MNEMONIC_XSHA1 || insn1.mnemonic == ZYDIS_MNEMONIC_XSHA256)
{
if (insn1.attributes & ZYDIS_ATTRIB_HAS_OPERANDSIZE)
{
return EXIT_SUCCESS;
}
}

ZydisReEncodeInstruction(&decoder, &insn1, operands1, insn1.operand_count_visible, buffer);

Expand Down

0 comments on commit e1b47b2

Please sign in to comment.