diff options
author | vanhauser-thc <vh@thc.org> | 2023-06-23 17:08:21 +0200 |
---|---|---|
committer | vanhauser-thc <vh@thc.org> | 2023-06-23 17:08:21 +0200 |
commit | c2c27349c3d74f79ceb6cd3795862b21d90429ea (patch) | |
tree | 8493de54c8f99b279ec24c2998dfb85403fc4a88 /src | |
parent | 2366c00235692c9ae11921cf38e9f6fe3fb30142 (diff) | |
download | afl++-c2c27349c3d74f79ceb6cd3795862b21d90429ea.tar.gz |
new mutation weighting
Diffstat (limited to 'src')
-rw-r--r-- | src/afl-fuzz-one.c | 30 |
1 files changed, 6 insertions, 24 deletions
diff --git a/src/afl-fuzz-one.c b/src/afl-fuzz-one.c index 32c05182..c6e49653 100644 --- a/src/afl-fuzz-one.c +++ b/src/afl-fuzz-one.c @@ -2101,27 +2101,17 @@ havoc_stage: */ - rand_max = MUT_STRATEGY_ARRAY_SIZE; - if (unlikely(afl->text_input)) { // is text? if (likely(afl->fuzz_mode == 0)) { // is exploration? - 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; - - } + mutation_array = (unsigned int *)&text_array; + rand_max = MUT_TXT_ARRAY_SIZE; } else { // is exploitation! mutation_array = (unsigned int *)&mutation_strategy_exploitation_text; + rand_max = MUT_STRATEGY_ARRAY_SIZE; } @@ -2129,21 +2119,13 @@ havoc_stage: if (likely(afl->fuzz_mode == 0)) { // is exploration? - 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; - - } + mutation_array = (unsigned int *)&binary_array; + rand_max = MUT_BIN_ARRAY_SIZE; } else { // is exploitation! mutation_array = (unsigned int *)&mutation_strategy_exploitation_binary; + rand_max = MUT_STRATEGY_ARRAY_SIZE; } |