diff options
author | hexcoder- <heiko@hexco.de> | 2020-10-15 23:30:55 +0200 |
---|---|---|
committer | hexcoder- <heiko@hexco.de> | 2020-10-15 23:30:55 +0200 |
commit | fffe53136cae30316db1578b3d7f09fca3b5bc47 (patch) | |
tree | 164c459249735d1a259b4fe4578c19daeffb05b4 /src/afl-fuzz-run.c | |
parent | bded51e4eaaa4148516a407b68264e424d0fbbd5 (diff) | |
parent | 190a9cf1e4e6cd08f83acbb9d893688b5fb00f3d (diff) | |
download | afl++-fffe53136cae30316db1578b3d7f09fca3b5bc47.tar.gz |
Merge branch 'dev' of https://github.com/AFLplusplus/AFLplusplus into dev
Diffstat (limited to 'src/afl-fuzz-run.c')
-rw-r--r-- | src/afl-fuzz-run.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/afl-fuzz-run.c b/src/afl-fuzz-run.c index ee22b0f6..dfd3abfb 100644 --- a/src/afl-fuzz-run.c +++ b/src/afl-fuzz-run.c @@ -692,6 +692,8 @@ void sync_fuzzers(afl_state_t *afl) { u8 trim_case(afl_state_t *afl, struct queue_entry *q, u8 *in_buf) { + u32 orig_len = q->len; + /* Custom mutator trimmer */ if (afl->custom_mutators_count) { @@ -709,6 +711,12 @@ u8 trim_case(afl_state_t *afl, struct queue_entry *q, u8 *in_buf) { }); + if (orig_len != q->len || custom_trimmed) { + + queue_testcase_retake(afl, q, orig_len); + + } + if (custom_trimmed) return trimmed_case; } @@ -842,6 +850,8 @@ u8 trim_case(afl_state_t *afl, struct queue_entry *q, u8 *in_buf) { close(fd); + queue_testcase_retake_mem(afl, q, in_buf, q->len, orig_len); + memcpy(afl->fsrv.trace_bits, afl->clean_trace, afl->fsrv.map_size); update_bitmap_score(afl, q); |