about summary refs log tree commit diff
path: root/src/afl-fuzz-bitmap.c
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2023-04-05 12:12:05 +0200
committervanhauser-thc <vh@thc.org>2023-04-05 12:12:05 +0200
commita74561b0e7434282ad214ca634b5c19c2f345e8e (patch)
tree807cf2326da7641ef5c9623c6300763d336adf4b /src/afl-fuzz-bitmap.c
parente313180e4d3f7ba44b773e43af40d4af21088576 (diff)
downloadafl++-a74561b0e7434282ad214ca634b5c19c2f345e8e.tar.gz
implement switch mode
Diffstat (limited to 'src/afl-fuzz-bitmap.c')
-rw-r--r--src/afl-fuzz-bitmap.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/afl-fuzz-bitmap.c b/src/afl-fuzz-bitmap.c
index d9c792d1..a937c96d 100644
--- a/src/afl-fuzz-bitmap.c
+++ b/src/afl-fuzz-bitmap.c
@@ -529,6 +529,18 @@ save_if_interesting(afl_state_t *afl, void *mem, u32 len, u8 fault) {
     close(fd);
     add_to_queue(afl, queue_fn, len, 0);
 
+    if (unlikely(afl->fuzz_mode) && likely(afl->switch_fuzz_mode)) {
+
+      if (afl->afl_env.afl_no_ui) {
+
+        ACTF("New coverage found, switching back to exploration mode.");
+
+      }
+
+      afl->fuzz_mode = 0;
+
+    }
+
 #ifdef INTROSPECTION
     if (afl->custom_mutators_count && afl->current_custom_fuzz) {