about summary refs log tree commit diff
path: root/src/afl-fuzz-queue.c
diff options
context:
space:
mode:
authorAndrea Fioraldi <andreafioraldi@gmail.com>2020-03-08 12:38:01 +0100
committerGitHub <noreply@github.com>2020-03-08 12:38:01 +0100
commit891f6985ed39dba44dc0cf2c56d22882d97024b0 (patch)
treefc5eec5cd8b1fcd7d0071c7660342b2494e1d497 /src/afl-fuzz-queue.c
parent98ffef26dcc59c48e1afa00ddb8c39206602ccfe (diff)
parente7bc3e09a3913e5c06d4150e8c8a44a70774937c (diff)
downloadafl++-891f6985ed39dba44dc0cf2c56d22882d97024b0.tar.gz
Merge pull request #238 from h1994st/master
Two new hooks for the custom mutator
Diffstat (limited to 'src/afl-fuzz-queue.c')
-rw-r--r--src/afl-fuzz-queue.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/afl-fuzz-queue.c b/src/afl-fuzz-queue.c
index 0880de75..ad9dad13 100644
--- a/src/afl-fuzz-queue.c
+++ b/src/afl-fuzz-queue.c
@@ -139,6 +139,17 @@ void add_to_queue(u8* fname, u32 len, u8 passed_det) {
 
   last_path_time = get_cur_time();
 
+  if (mutator && mutator->afl_custom_queue_new_entry) {
+
+    u8* fname_orig = NULL;
+
+    /* At the initialization stage, queue_cur is NULL */
+    if (queue_cur) fname_orig = queue_cur->fname;
+
+    mutator->afl_custom_queue_new_entry(fname, fname_orig);
+
+  }
+
 }
 
 /* Destroy the entire queue. */