diff options
author | van Hauser <vh@thc.org> | 2020-05-12 11:04:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-12 11:04:18 +0200 |
commit | 1317433a51a7f7336c82c80a592835ddda9ef60f (patch) | |
tree | e623506f1d0a8771c3fc266eed0a75b626a88724 /src/afl-fuzz-queue.c | |
parent | bdd2a412c476cbd5aea0fff67ef096305815953b (diff) | |
parent | a578d719e1f556db07ca3c7e2fe38b7668c204d8 (diff) | |
download | afl++-1317433a51a7f7336c82c80a592835ddda9ef60f.tar.gz |
Merge pull request #359 from AFLplusplus/dev
push to master
Diffstat (limited to 'src/afl-fuzz-queue.c')
-rw-r--r-- | src/afl-fuzz-queue.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/afl-fuzz-queue.c b/src/afl-fuzz-queue.c index f998c06b..cfeb6c5e 100644 --- a/src/afl-fuzz-queue.c +++ b/src/afl-fuzz-queue.c @@ -140,15 +140,22 @@ void add_to_queue(afl_state_t *afl, u8 *fname, u32 len, u8 passed_det) { afl->last_path_time = get_cur_time(); - if (afl->mutator && afl->mutator->afl_custom_queue_new_entry) { + if (afl->custom_mutators_count) { - u8 *fname_orig = NULL; + LIST_FOREACH(&afl->custom_mutator_list, struct custom_mutator, { - /* At the initialization stage, queue_cur is NULL */ - if (afl->queue_cur) { fname_orig = afl->queue_cur->fname; } + if (el->afl_custom_queue_new_entry) { - afl->mutator->afl_custom_queue_new_entry(afl->mutator->data, fname, - fname_orig); + u8 *fname_orig = NULL; + + /* At the initialization stage, queue_cur is NULL */ + if (afl->queue_cur) fname_orig = afl->queue_cur->fname; + + el->afl_custom_queue_new_entry(el->data, fname, fname_orig); + + } + + }); } |