aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2023-05-23 09:01:49 +0200
committervanhauser-thc <vh@thc.org>2023-05-23 09:01:49 +0200
commitd5e3223f0340181e74d352db3def2c98cf14d628 (patch)
tree3c593a23fa9fe50b6114c82972048a3c4ff59330 /src
parent029e039cbcbf9e30f35eb255162679b8d609d25d (diff)
downloadafl++-d5e3223f0340181e74d352db3def2c98cf14d628.tar.gz
fix custom mutator only check
Diffstat (limited to 'src')
-rw-r--r--src/afl-fuzz.c54
1 files changed, 27 insertions, 27 deletions
diff --git a/src/afl-fuzz.c b/src/afl-fuzz.c
index 559a7326..4134b99e 100644
--- a/src/afl-fuzz.c
+++ b/src/afl-fuzz.c
@@ -1746,33 +1746,6 @@ int main(int argc, char **argv_orig, char **envp) {
check_if_tty(afl);
if (afl->afl_env.afl_force_ui) { afl->not_on_tty = 0; }
- if (afl->afl_env.afl_custom_mutator_only) {
-
- if (!afl->custom_mutators_count) {
-
- if (afl->shm.cmplog_mode) {
-
- WARNF(
- "No custom mutator loaded, using AFL_CUSTOM_MUTATOR_ONLY is "
- "pointless and only allowed now to allow experiments with CMPLOG.");
-
- } else {
-
- FATAL(
- "No custom mutator loaded but AFL_CUSTOM_MUTATOR_ONLY specified.");
-
- }
-
- }
-
- /* This ensures we don't proceed to havoc/splice */
- afl->custom_only = 1;
-
- /* Ensure we also skip all deterministic steps */
- afl->skip_deterministic = 1;
-
- }
-
get_core_count(afl);
atexit(at_exit);
@@ -1872,6 +1845,33 @@ int main(int argc, char **argv_orig, char **envp) {
setup_custom_mutators(afl);
+ if (afl->afl_env.afl_custom_mutator_only) {
+
+ if (!afl->custom_mutators_count) {
+
+ if (afl->shm.cmplog_mode) {
+
+ WARNF(
+ "No custom mutator loaded, using AFL_CUSTOM_MUTATOR_ONLY is "
+ "pointless and only allowed now to allow experiments with CMPLOG.");
+
+ } else {
+
+ FATAL(
+ "No custom mutator loaded but AFL_CUSTOM_MUTATOR_ONLY specified.");
+
+ }
+
+ }
+
+ /* This ensures we don't proceed to havoc/splice */
+ afl->custom_only = 1;
+
+ /* Ensure we also skip all deterministic steps */
+ afl->skip_deterministic = 1;
+
+ }
+
if (afl->limit_time_sig > 0 && afl->custom_mutators_count) {
if (afl->custom_only) {