From 3d1a57deed63bdff6c817e1b1a8098df94ea5eac Mon Sep 17 00:00:00 2001 From: Ruben ten Hove Date: Fri, 17 Jun 2022 21:03:46 +0200 Subject: feat: allow to skip readme creation on crash --- src/afl-fuzz-bitmap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/afl-fuzz-bitmap.c') diff --git a/src/afl-fuzz-bitmap.c b/src/afl-fuzz-bitmap.c index 26e70d81..fffcef89 100644 --- a/src/afl-fuzz-bitmap.c +++ b/src/afl-fuzz-bitmap.c @@ -720,7 +720,7 @@ save_if_interesting(afl_state_t *afl, void *mem, u32 len, u8 fault) { } - if (unlikely(!afl->saved_crashes)) { write_crash_readme(afl); } + if (unlikely(!afl->saved_crashes) && (afl->afl_env.afl_no_crash_readme != 1)) { write_crash_readme(afl); } #ifndef SIMPLE_FILES @@ -821,4 +821,3 @@ save_if_interesting(afl_state_t *afl, void *mem, u32 len, u8 fault) { return keeping; } - -- cgit 1.4.1 From 499082384094e9cb3ff4fe18ee068e302e550aa3 Mon Sep 17 00:00:00 2001 From: Ruben ten Hove Date: Fri, 17 Jun 2022 21:08:37 +0200 Subject: formatting --- include/afl-fuzz.h | 1 + include/envs.h | 1 + src/afl-fuzz-bitmap.c | 8 +++++++- src/afl-fuzz-state.c | 1 + 4 files changed, 10 insertions(+), 1 deletion(-) (limited to 'src/afl-fuzz-bitmap.c') diff --git a/include/afl-fuzz.h b/include/afl-fuzz.h index b78d0b98..ce42a107 100644 --- a/include/afl-fuzz.h +++ b/include/afl-fuzz.h @@ -1267,3 +1267,4 @@ void queue_testcase_store_mem(afl_state_t *afl, struct queue_entry *q, u8 *mem); #endif #endif + diff --git a/include/envs.h b/include/envs.h index 4105ac6d..9b8917f9 100644 --- a/include/envs.h +++ b/include/envs.h @@ -235,3 +235,4 @@ static char *afl_environment_variables[] = { extern char *afl_environment_variables[]; #endif + diff --git a/src/afl-fuzz-bitmap.c b/src/afl-fuzz-bitmap.c index fffcef89..089f7bb5 100644 --- a/src/afl-fuzz-bitmap.c +++ b/src/afl-fuzz-bitmap.c @@ -720,7 +720,12 @@ save_if_interesting(afl_state_t *afl, void *mem, u32 len, u8 fault) { } - if (unlikely(!afl->saved_crashes) && (afl->afl_env.afl_no_crash_readme != 1)) { write_crash_readme(afl); } + if (unlikely(!afl->saved_crashes) && + (afl->afl_env.afl_no_crash_readme != 1)) { + + write_crash_readme(afl); + + } #ifndef SIMPLE_FILES @@ -821,3 +826,4 @@ save_if_interesting(afl_state_t *afl, void *mem, u32 len, u8 fault) { return keeping; } + diff --git a/src/afl-fuzz-state.c b/src/afl-fuzz-state.c index 4d16811f..cc4138ae 100644 --- a/src/afl-fuzz-state.c +++ b/src/afl-fuzz-state.c @@ -673,3 +673,4 @@ void afl_states_request_skip(void) { LIST_FOREACH(&afl_states, afl_state_t, { el->skip_requested = 1; }); } + -- cgit 1.4.1