From e90a3e4e2677b5b6e0413be937d16b0a8f2eecba Mon Sep 17 00:00:00 2001 From: AteChroma0j <152338833+AteChroma0j@users.noreply.github.com> Date: Thu, 4 Jan 2024 22:35:43 +0100 Subject: [PATCH 1/2] Do not mangle in dry run --- fuzz.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fuzz.c b/fuzz.c index f7ecc0536..5db9706b4 100644 --- a/fuzz.c +++ b/fuzz.c @@ -358,7 +358,7 @@ static bool fuzz_fetchInput(run_t* run) { fuzzState_t st = fuzz_getState(run->global); if (st == _HF_STATE_DYNAMIC_DRY_RUN) { run->mutationsPerRun = 0U; - if (input_prepareStaticFile(run, /* rewind= */ false, true)) { + if (input_prepareStaticFile(run, /* rewind= */ false, /* mangle= */ false)) { return true; } fuzz_setDynamicMainState(run); From c81048eae213b99f19e3e4b5a1113b3dafb20862 Mon Sep 17 00:00:00 2001 From: AteChroma0j <152338833+AteChroma0j@users.noreply.github.com> Date: Thu, 4 Jan 2024 22:38:38 +0100 Subject: [PATCH 2/2] Read whole input file in dry run --- input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/input.c b/input.c index a03b6674f..5b76dc838 100644 --- a/input.c +++ b/input.c @@ -726,7 +726,7 @@ const uint8_t* input_getRandomInputAsBuf(run_t* run, size_t* len) { } static bool input_shouldReadNewFile(run_t* run) { - if (fuzz_getState(run->global) != _HF_STATE_DYNAMIC_DRY_RUN) { + if (fuzz_getState(run->global) == _HF_STATE_DYNAMIC_DRY_RUN) { input_setSize(run, run->global->mutate.maxInputSz); return true; }