post_process 0/NULL return support

This commit is contained in:
vanhauser-thc
2022-07-19 12:24:03 +02:00
parent b847e0f414
commit ca4a8c0f92
7 changed files with 82 additions and 15 deletions

View File

@ -647,8 +647,19 @@ save_if_interesting(afl_state_t *afl, void *mem, u32 len, u8 fault) {
if (afl->fsrv.exec_tmout < afl->hang_tmout) {
u8 new_fault;
len = write_to_testcase(afl, &mem, len, 0);
u8 new_fault;
u32 tmp_len = write_to_testcase(afl, &mem, len, 0);
if (likely(tmp_len)) {
len = tmp_len;
} else {
len = write_to_testcase(afl, &mem, len, 1);
}
new_fault = fuzz_run_target(afl, &afl->fsrv, afl->hang_tmout);
classify_counts(&afl->fsrv);