about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authoryangzao <yangzaocn@outlook.com>2023-11-24 22:47:50 -0700
committeryangzao <yangzaocn@outlook.com>2023-11-24 22:47:50 -0700
commit8af74bcaeebbe2407006333024d8803baacdb4e2 (patch)
treea3a91f12c51576e521503a8300bb5aded12079ba /src
parent770e868d04c0f52a1c57e5471e459dd24a002748 (diff)
downloadafl++-8af74bcaeebbe2407006333024d8803baacdb4e2.tar.gz
update afl-fuzz-run
Diffstat (limited to 'src')
-rw-r--r--src/afl-fuzz-run.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/afl-fuzz-run.c b/src/afl-fuzz-run.c
index 29cc5352..ac346b86 100644
--- a/src/afl-fuzz-run.c
+++ b/src/afl-fuzz-run.c
@@ -60,7 +60,7 @@ fuzz_run_target(afl_state_t *afl, afl_forkserver_t *fsrv, u32 timeout) {
 
   fsrv_run_result_t res = afl_fsrv_run_target(fsrv, timeout, &afl->stop_soon);
 
-  
+  post_run(afl);
 
 #ifdef PROFILING
   clock_gettime(CLOCK_REALTIME, &spec);
@@ -1113,3 +1113,20 @@ common_fuzz_stuff(afl_state_t *afl, u8 *out_buf, u32 len) {
 
 }
 
+/* Run some code each time scripts each time AFL++ executes the target
+   with afl-fuzz. */
+
+void post_run(afl_state_t *afl) {
+  if (unlikely(afl->custom_mutators_count)) {
+
+      LIST_FOREACH(&afl->custom_mutator_list, struct custom_mutator, {
+
+        if (el->afl_custom_post_run) {
+
+          el->afl_custom_post_run(el->data);
+
+        }
+
+      });
+    }
+}
\ No newline at end of file