retake from mem if possible

This commit is contained in:
van Hauser
2020-10-15 15:48:39 +02:00
parent 354bda2846
commit f41aafa4f7
3 changed files with 44 additions and 7 deletions

View File

@ -711,7 +711,11 @@ u8 trim_case(afl_state_t *afl, struct queue_entry *q, u8 *in_buf) {
});
if (orig_len != q->len) { queue_testcase_retake(afl, q, orig_len); }
if (orig_len != q->len || custom_trimmed) {
queue_testcase_retake(afl, q, orig_len);
}
if (custom_trimmed) return trimmed_case;
@ -846,7 +850,7 @@ u8 trim_case(afl_state_t *afl, struct queue_entry *q, u8 *in_buf) {
close(fd);
if (orig_len != q->len) queue_testcase_retake(afl, q, orig_len);
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);