about summary refs log tree commit diff
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-11-10 14:20:41 +0100
committervan Hauser <vh@thc.org>2020-11-10 14:20:41 +0100
commita3928e5a62c3ed4af321cc6030efc250b6a585c0 (patch)
treec8e174f59beaac410fa6bb2e634ea0a34aa9b8a2
parent1dfd7df7c0e28b6f356bda714bedfc612bf2db75 (diff)
downloadafl++-a3928e5a62c3ed4af321cc6030efc250b6a585c0.tar.gz
small fix to actually document custom mutator introspection
-rw-r--r--src/afl-fuzz-bitmap.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/afl-fuzz-bitmap.c b/src/afl-fuzz-bitmap.c
index 132499d6..a4407af7 100644
--- a/src/afl-fuzz-bitmap.c
+++ b/src/afl-fuzz-bitmap.c
@@ -588,12 +588,7 @@ save_if_interesting(afl_state_t *afl, void *mem, u32 len, u8 fault) {
     add_to_queue(afl, queue_fn, len, 0);
 
 #ifdef INTROSPECTION
-    if (afl->mutation[0] != 0) {
-
-      fprintf(afl->introspection_file, "QUEUE %s = %s\n", afl->mutation,
-              afl->queue_top->fname);
-
-    } else if (afl->custom_mutators_count && afl->current_custom_fuzz) {
+    if (afl->custom_mutators_count && afl->current_custom_fuzz) {
 
       LIST_FOREACH(&afl->custom_mutator_list, struct custom_mutator, {
 
@@ -612,6 +607,11 @@ save_if_interesting(afl_state_t *afl, void *mem, u32 len, u8 fault) {
 
       });
 
+    } else if (afl->mutation[0] != 0) {
+
+      fprintf(afl->introspection_file, "QUEUE %s = %s\n", afl->mutation,
+              afl->queue_top->fname);
+
     }
 
 #endif
@@ -689,11 +689,7 @@ save_if_interesting(afl_state_t *afl, void *mem, u32 len, u8 fault) {
 
       ++afl->unique_tmouts;
 #ifdef INTROSPECTION
-      if (afl->mutation[0] != 0) {
-
-        fprintf(afl->introspection_file, "UNIQUE_TIMEOUT %s\n", afl->mutation);
-
-      } else if (afl->custom_mutators_count && afl->current_custom_fuzz) {
+      if (afl->custom_mutators_count && afl->current_custom_fuzz) {
 
         LIST_FOREACH(&afl->custom_mutator_list, struct custom_mutator, {
 
@@ -713,6 +709,10 @@ save_if_interesting(afl_state_t *afl, void *mem, u32 len, u8 fault) {
 
         });
 
+      } else if (afl->mutation[0] != 0) {
+
+        fprintf(afl->introspection_file, "UNIQUE_TIMEOUT %s\n", afl->mutation);
+
       }
 
 #endif
@@ -800,11 +800,7 @@ save_if_interesting(afl_state_t *afl, void *mem, u32 len, u8 fault) {
 
       ++afl->unique_crashes;
 #ifdef INTROSPECTION
-      if (afl->mutation[0] != 0) {
-
-        fprintf(afl->introspection_file, "UNIQUE_CRASH %s\n", afl->mutation);
-
-      } else if (afl->custom_mutators_count && afl->current_custom_fuzz) {
+      if (afl->custom_mutators_count && afl->current_custom_fuzz) {
 
         LIST_FOREACH(&afl->custom_mutator_list, struct custom_mutator, {
 
@@ -823,6 +819,10 @@ save_if_interesting(afl_state_t *afl, void *mem, u32 len, u8 fault) {
 
         });
 
+      } else if (afl->mutation[0] != 0) {
+
+        fprintf(afl->introspection_file, "UNIQUE_CRASH %s\n", afl->mutation);
+
       }
 
 #endif