From 8f93cf5c55c8a845f90ec283effe0114488a7e31 Mon Sep 17 00:00:00 2001 From: h1994st Date: Sat, 7 Mar 2020 16:28:48 -0500 Subject: Add two new hooks for the custom mutator - `afl_custom_queue_get` and `afl_custom_queue_new_entry` - Update the corresponding document and examples --- src/afl-fuzz-one.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/afl-fuzz-one.c') diff --git a/src/afl-fuzz-one.c b/src/afl-fuzz-one.c index f12f4a67..1817bd03 100644 --- a/src/afl-fuzz-one.c +++ b/src/afl-fuzz-one.c @@ -355,6 +355,15 @@ u8 fuzz_one_original(char** argv) { #else + if (mutator && mutator->afl_custom_queue_get) { + + /* The custom mutator will decide to skip this test case or not. */ + + if (!mutator->afl_custom_queue_get(queue_cur->fname)) + return 1; + + } + if (pending_favored) { /* If we have any favored, non-fuzzed new arrivals in the queue, -- cgit 1.4.1