about summary refs log tree commit diff
path: root/src/afl-fuzz-one.c
diff options
context:
space:
mode:
authorh1994st <h1994st@gmail.com>2020-03-07 16:28:48 -0500
committerh1994st <h1994st@gmail.com>2020-03-07 16:28:48 -0500
commit8f93cf5c55c8a845f90ec283effe0114488a7e31 (patch)
treea36c2e816ad99fde6b216513b989a6a006b91f00 /src/afl-fuzz-one.c
parentdc0b2dda5e4ec41ea491e63f0ec31c5da6fe7f1d (diff)
downloadafl++-8f93cf5c55c8a845f90ec283effe0114488a7e31.tar.gz
Add two new hooks for the custom mutator
- `afl_custom_queue_get` and `afl_custom_queue_new_entry`
- Update the corresponding document and examples
Diffstat (limited to 'src/afl-fuzz-one.c')
-rw-r--r--src/afl-fuzz-one.c9
1 files changed, 9 insertions, 0 deletions
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,