about summary refs log tree commit diff
path: root/src/afl-forkserver.c
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2024-06-27 18:51:54 +0200
committervanhauser-thc <vh@thc.org>2024-06-27 18:51:58 +0200
commitba7313b521df7a347cd9f96a694cd8caa63b9b41 (patch)
treebb873333e4a75b3dc667809d4ae6b2709777d3be /src/afl-forkserver.c
parente2d30641bebfada56f1fdd8cbf16c23a97f96c40 (diff)
downloadafl++-ba7313b521df7a347cd9f96a694cd8caa63b9b41.tar.gz
AFL_CUSTOM_MUTATOR_LATE_SEND added
Diffstat (limited to 'src/afl-forkserver.c')
-rw-r--r--src/afl-forkserver.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/afl-forkserver.c b/src/afl-forkserver.c
index a998c10f..cec91f76 100644
--- a/src/afl-forkserver.c
+++ b/src/afl-forkserver.c
@@ -292,6 +292,9 @@ void afl_fsrv_init_dup(afl_forkserver_t *fsrv_to, afl_forkserver_t *from) {
   fsrv_to->use_fauxsrv = 0;
   fsrv_to->last_run_timed_out = 0;
 
+  fsrv_to->late_send = from->late_send;
+  fsrv_to->custom_data_ptr = from->custom_data_ptr;
+
   fsrv_to->init_child_func = from->init_child_func;
   // Note: do not copy ->add_extra_func or ->persistent_record*
 
@@ -1952,6 +1955,13 @@ afl_fsrv_run_target(afl_forkserver_t *fsrv, u32 timeout,
 
   }
 
+  if (unlikely(fsrv->late_send)) {
+
+    fsrv->late_send(fsrv->custom_data_ptr, fsrv->custom_input,
+                    fsrv->custom_input_len);
+
+  }
+
   exec_ms = read_s32_timed(fsrv->fsrv_st_fd, &fsrv->child_status, timeout,
                            stop_soon_p);