aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2023-06-21 09:38:21 +0200
committervanhauser-thc <vh@thc.org>2023-06-21 09:38:21 +0200
commit2366c00235692c9ae11921cf38e9f6fe3fb30142 (patch)
treedbd1a99459eb1f12c2869dbccce469a9ee98dbdc /src
parent51ab51ca278dafacfca1131fd339529e9d7dce08 (diff)
downloadafl++-2366c00235692c9ae11921cf38e9f6fe3fb30142.tar.gz
switch back to normal mutations
Diffstat (limited to 'src')
-rw-r--r--src/afl-fuzz-one.c26
1 files changed, 23 insertions, 3 deletions
diff --git a/src/afl-fuzz-one.c b/src/afl-fuzz-one.c
index 4efc661e..32c05182 100644
--- a/src/afl-fuzz-one.c
+++ b/src/afl-fuzz-one.c
@@ -2103,11 +2103,21 @@ havoc_stage:
rand_max = MUT_STRATEGY_ARRAY_SIZE;
- if (unlikely(afl->text_input /*|| afl->queue_cur->is_ascii*/)) { // is text?
+ if (unlikely(afl->text_input)) { // is text?
if (likely(afl->fuzz_mode == 0)) { // is exploration?
- mutation_array = (unsigned int *)&mutation_strategy_exploration_text;
+ if (unlikely(afl->expand_havoc && afl->ready_for_splicing_count > 1)) {
+
+ mutation_array = full_splice_array;
+ rand_max = MUT_SPLICE_ARRAY_SIZE;
+
+ } else {
+
+ mutation_array = normal_splice_array;
+ rand_max = MUT_NORMAL_ARRAY_SIZE;
+
+ }
} else { // is exploitation!
@@ -2119,7 +2129,17 @@ havoc_stage:
if (likely(afl->fuzz_mode == 0)) { // is exploration?
- mutation_array = (unsigned int *)&mutation_strategy_exploration_binary;
+ if (unlikely(afl->expand_havoc && afl->ready_for_splicing_count > 1)) {
+
+ mutation_array = full_splice_array;
+ rand_max = MUT_SPLICE_ARRAY_SIZE;
+
+ } else {
+
+ mutation_array = normal_splice_array;
+ rand_max = MUT_NORMAL_ARRAY_SIZE;
+
+ }
} else { // is exploitation!