Skip to content

Commit f05434e

Browse files
committed
Fuzzing test
1 parent 615a8f5 commit f05434e

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/SharedData.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,4 +211,4 @@ ZyanBool ZydisGetAccessedFlags(const ZydisInstructionDefinition* definition,
211211

212212
/* ---------------------------------------------------------------------------------------------- */
213213

214-
/* ============================================================================================== */
214+
/* ============================================================================================== */

tools/ZydisFuzzDecoder.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ typedef struct ZydisFuzzControlBlock_
4949
ZyanUPointer formatter_properties[ZYDIS_FORMATTER_PROP_MAX_VALUE + 1];
5050
char string[16];
5151
ZyanU16 formatter_max_len;
52+
53+
ZydisDecoder decoder;
54+
ZydisDecoderContext context;
55+
ZydisDecodedInstruction instruction;
5256
} ZydisFuzzControlBlock;
5357

5458
/* ============================================================================================== */
@@ -86,6 +90,9 @@ int ZydisFuzzTarget(ZydisStreamRead read_fn, void* stream_ctx)
8690
}
8791
}
8892

93+
ZydisDecodedOperand operands2[ZYDIS_MAX_OPERAND_COUNT];
94+
ZydisDecoderDecodeOperands(&control_block.decoder, &control_block.context, &control_block.instruction, operands2, ZYDIS_MAX_OPERAND_COUNT);
95+
8996
ZydisFormatter formatter;
9097
if (!ZYAN_SUCCESS(ZydisFormatterInit(&formatter, control_block.formatter_style)))
9198
{

0 commit comments

Comments
 (0)