This commit is contained in:
vanhauser-thc
2023-01-18 22:31:55 +01:00
parent 14d8eb9e40
commit 17752465e6
3 changed files with 5 additions and 12 deletions

View File

@ -11,6 +11,8 @@ If you have a dictionary (`-x`) this improves this custom grammar mutator.
If **not** running with `CMPLOG`, it is possible to set
`AFL_CUSTOM_MUTATOR_ONLY` to concentrate on grammar bug classes.
Do **not** set `AFL_DISABLE_TRIM` with this custom mutator!
## Configuration via environment variables
`AUTOTOKENS_ONLY_FAV` - only use this mutator on favorite queue items

View File

@ -1,12 +1,6 @@
whitespace belassen oder notieren? MAYBE
0=space 1=tab 2=linefeed
cmplog: only add tokens that were found to fit?
create from thin air if no good seed after a cycle and dict large enough?
(static u32 no_of_struct_inputs;)
splice insert, splice overwrite
(linefeed, semicolon)
splicing -> check if whitespace/token is needed

View File

@ -217,11 +217,8 @@ extern "C" size_t afl_custom_fuzz(my_mutator_t *data, u8 *buf, size_t buf_size,
MIN(m_size - dst_off - AUTOTOKENS_SPLICE_MIN,
src_size - src_off - AUTOTOKENS_SPLICE_MIN)));
for (u32 i = 0; i < n; ++i) {
m[dst_off + i] = (*src)[src_off + i];
}
copy(src->begin() + src_off, src->begin() + src_off + n,
m.begin() + dst_off);
DEBUG(stderr, "SPLICE-MUT: %u at %u\n", n, dst_off);
break;