diff options
author | vanhauser-thc <vh@thc.org> | 2021-07-09 11:39:25 +0200 |
---|---|---|
committer | vanhauser-thc <vh@thc.org> | 2021-07-09 11:39:25 +0200 |
commit | d354ec2586a3a31c87a8b95433c2886f04c44a03 (patch) | |
tree | 1dcd1a1c7460677f8ea7e299126580cad018a0f1 /src/afl-fuzz-queue.c | |
parent | e1d5009229fb5cea5845cd08e0abdc8fe440ee86 (diff) | |
download | afl++-d354ec2586a3a31c87a8b95433c2886f04c44a03.tar.gz |
more fixes
Diffstat (limited to 'src/afl-fuzz-queue.c')
-rw-r--r-- | src/afl-fuzz-queue.c | 38 |
1 files changed, 3 insertions, 35 deletions
diff --git a/src/afl-fuzz-queue.c b/src/afl-fuzz-queue.c index 48794e95..8080775f 100644 --- a/src/afl-fuzz-queue.c +++ b/src/afl-fuzz-queue.c @@ -474,42 +474,10 @@ void add_to_queue(afl_state_t *afl, u8 *fname, u32 len, u8 passed_det) { if (afl->custom_mutators_count) { - u8 updated = 0; + /* At the initialization stage, queue_cur is NULL */ + if (afl->queue_cur && !afl->syncing_party) { - LIST_FOREACH(&afl->custom_mutator_list, struct custom_mutator, { - - if (el->afl_custom_queue_new_entry) { - - u8 *fname_orig = NULL; - - /* At the initialization stage, queue_cur is NULL */ - if (afl->queue_cur && !afl->syncing_party) { - - fname_orig = afl->queue_cur->fname; - - } - - if (el->afl_custom_queue_new_entry(el->data, fname, fname_orig)) { - - updated = 1; - - } - - } - - }); - - if (updated) { - - struct stat st; - if (stat(fname, &st)) { PFATAL("File %s is gone!", fname); } - if (!st.st_size) { - - FATAL("File %s became empty in custom mutator!", fname); - - } - - q->len = st.st_size; + run_afl_custom_queue_new_entry(afl, q, fname, afl->queue_cur->fname); } |