diff options
author | vanhauser-thc <vh@thc.org> | 2024-06-27 18:51:54 +0200 |
---|---|---|
committer | vanhauser-thc <vh@thc.org> | 2024-06-27 18:51:58 +0200 |
commit | ba7313b521df7a347cd9f96a694cd8caa63b9b41 (patch) | |
tree | bb873333e4a75b3dc667809d4ae6b2709777d3be /src/afl-fuzz.c | |
parent | e2d30641bebfada56f1fdd8cbf16c23a97f96c40 (diff) | |
download | afl++-ba7313b521df7a347cd9f96a694cd8caa63b9b41.tar.gz |
AFL_CUSTOM_MUTATOR_LATE_SEND added
Diffstat (limited to 'src/afl-fuzz.c')
-rw-r--r-- | src/afl-fuzz.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/afl-fuzz.c b/src/afl-fuzz.c index b53a9a2d..8a84d447 100644 --- a/src/afl-fuzz.c +++ b/src/afl-fuzz.c @@ -2142,6 +2142,31 @@ int main(int argc, char **argv_orig, char **envp) { } + if (afl->custom_mutators_count && afl->afl_env.afl_custom_mutator_late_send) { + + u32 count_send = 0; + LIST_FOREACH(&afl->custom_mutator_list, struct custom_mutator, { + + if (el->afl_custom_fuzz_send) { + + if (count_send) { + + FATAL( + "You can only have one custom send() function if you are using " + "AFL_CUSTOM_MUTATOR_LATE_SEND!"); + + } + + afl->fsrv.late_send = el->afl_custom_fuzz_send; + afl->fsrv.custom_data_ptr = el->data; + count_send = 1; + + } + + }); + + } + if (afl->limit_time_sig > 0 && afl->custom_mutators_count) { if (afl->custom_only) { |