Add two new hooks for the custom mutator

- `afl_custom_queue_get` and `afl_custom_queue_new_entry`
- Update the corresponding document and examples
This commit is contained in:
h1994st
2020-03-07 16:28:48 -05:00
parent dc0b2dda5e
commit 8f93cf5c55
8 changed files with 313 additions and 20 deletions

View File

@ -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. */