aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2021-04-13 13:01:50 +0200
committervanhauser-thc <vh@thc.org>2021-04-13 13:01:50 +0200
commitbe880f2476963b8ebebe9d8cc196e4e74104c7a6 (patch)
tree9ae79ba89167e358892e99e0caa2b266e95a55a9 /src
parent50bb931ea604a83784609dc71934a4a8f8feb156 (diff)
downloadafl++-be880f2476963b8ebebe9d8cc196e4e74104c7a6.tar.gz
add AFL_EXIT_ON_SEED_ISSUES
Diffstat (limited to 'src')
-rw-r--r--src/afl-fuzz-init.c8
-rw-r--r--src/afl-fuzz-state.c7
2 files changed, 14 insertions, 1 deletions
diff --git a/src/afl-fuzz-init.c b/src/afl-fuzz-init.c
index e505abd4..b6bfbc29 100644
--- a/src/afl-fuzz-init.c
+++ b/src/afl-fuzz-init.c
@@ -881,7 +881,7 @@ void perform_dry_run(afl_state_t *afl) {
case FSRV_RUN_TMOUT:
- if (afl->timeout_given) {
+ if (afl->timeout_given && !afl->afl_env.afl_exit_on_seed_issues) {
/* if we have a timeout but a timeout value was given then always
skip. The '+' meaning has been changed! */
@@ -1036,6 +1036,12 @@ void perform_dry_run(afl_state_t *afl) {
}
+ if (afl->afl_env.afl_exit_on_seed_issues) {
+
+ FATAL("As AFL_EXIT_ON_SEED_ISSUES is set, afl-fuzz exits.");
+
+ }
+
/* Remove from fuzzing queue but keep for splicing */
struct queue_entry *p = afl->queue;
diff --git a/src/afl-fuzz-state.c b/src/afl-fuzz-state.c
index f65ff1bb..28d3339a 100644
--- a/src/afl-fuzz-state.c
+++ b/src/afl-fuzz-state.c
@@ -306,6 +306,13 @@ void read_afl_environment(afl_state_t *afl, char **envp) {
afl->cycle_schedules = afl->afl_env.afl_cycle_schedules =
get_afl_env(afl_environment_variables[i]) ? 1 : 0;
+ } else if (!strncmp(env, "AFL_EXIT_ON_SEED_ISSUES",
+
+ afl_environment_variable_len)) {
+
+ afl->afl_env.afl_exit_on_seed_issues =
+ get_afl_env(afl_environment_variables[i]) ? 1 : 0;
+
} else if (!strncmp(env, "AFL_EXPAND_HAVOC_NOW",
afl_environment_variable_len)) {