diff options
author | van Hauser <vh@thc.org> | 2020-11-10 14:08:21 +0100 |
---|---|---|
committer | van Hauser <vh@thc.org> | 2020-11-10 14:08:21 +0100 |
commit | 8e1047f5efaece663bba9b8ef86d181198db5101 (patch) | |
tree | c2c2b38af0833f815a6b28b0c435fbe19fc65344 /src/afl-fuzz-one.c | |
parent | 166130324898071a08e178dfeb901af44168236e (diff) | |
download | afl++-8e1047f5efaece663bba9b8ef86d181198db5101.tar.gz |
support custom mutator introspection
Diffstat (limited to 'src/afl-fuzz-one.c')
-rw-r--r-- | src/afl-fuzz-one.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/afl-fuzz-one.c b/src/afl-fuzz-one.c index 91bbced6..64365ebb 100644 --- a/src/afl-fuzz-one.c +++ b/src/afl-fuzz-one.c @@ -1780,10 +1780,16 @@ custom_mutator_stage: orig_hit_cnt = afl->queued_paths + afl->unique_crashes; +#ifdef INTROSPECTION + afl->mutation[0] = 0; +#endif + LIST_FOREACH(&afl->custom_mutator_list, struct custom_mutator, { if (el->afl_custom_fuzz) { + afl->current_custom_fuzz = el; + if (el->afl_custom_fuzz_count) afl->stage_max = el->afl_custom_fuzz_count(el->data, out_buf, len); else @@ -1889,6 +1895,8 @@ custom_mutator_stage: }); + afl->current_custom_fuzz = NULL; + if (!has_custom_fuzz) goto havoc_stage; new_hit_cnt = afl->queued_paths + afl->unique_crashes; |