diff options
author | Alexander Shvedov <60114847+a-shvedov@users.noreply.github.com> | 2023-05-22 16:57:45 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-22 16:57:45 +0300 |
commit | 629edb1e78d791894ce9ee6d53259f95fe1a29af (patch) | |
tree | 3337fbdabebc223c5222b650127af7469a77f693 /src/afl-fuzz-one.c | |
parent | 8012b555a8cbc49f1c78d4a33cad56ea59280780 (diff) | |
parent | c4b1566ba35c697cda7822bd0cf30e2e3eeee0c7 (diff) | |
download | afl++-629edb1e78d791894ce9ee6d53259f95fe1a29af.tar.gz |
Merge pull request #2 from AFLplusplus/stable
push to stable (#1734)
Diffstat (limited to 'src/afl-fuzz-one.c')
-rw-r--r-- | src/afl-fuzz-one.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/afl-fuzz-one.c b/src/afl-fuzz-one.c index ee562f96..c6e9a295 100644 --- a/src/afl-fuzz-one.c +++ b/src/afl-fuzz-one.c @@ -842,6 +842,7 @@ u8 fuzz_one_original(afl_state_t *afl) { eff_map = afl_realloc(AFL_BUF_PARAM(eff), EFF_ALEN(len)); if (unlikely(!eff_map)) { PFATAL("alloc"); } + memset(eff_map, 0, EFF_ALEN(len)); eff_map[0] = 1; if (EFF_APOS(len - 1) != 0) { @@ -2047,20 +2048,22 @@ custom_mutator_stage: afl->queue_cur->stats_mutated += afl->stage_max; #endif - if (likely(afl->custom_only)) { + /**************** + * RANDOM HAVOC * + ****************/ + +havoc_stage: + + if (unlikely(afl->custom_only)) { + /* Force UI update */ + show_stats(afl); /* Skip other stages */ ret_val = 0; goto abandon_entry; } - /**************** - * RANDOM HAVOC * - ****************/ - -havoc_stage: - afl->stage_cur_byte = -1; /* The havoc stage mutation code is also invoked when splicing files; if the @@ -3570,6 +3573,7 @@ static u8 mopt_common_fuzzing(afl_state_t *afl, MOpt_globals_t MOpt_globals) { eff_map = afl_realloc(AFL_BUF_PARAM(eff), EFF_ALEN(len)); if (unlikely(!eff_map)) { PFATAL("alloc"); } + memset(eff_map, 0, EFF_ALEN(len)); eff_map[0] = 1; if (EFF_APOS(len - 1) != 0) { |