Skip to content

Commit

Permalink
Only execute the mutated input when it is not empty
Browse files Browse the repository at this point in the history
  • Loading branch information
kyakdan committed Jul 26, 2019
1 parent b2f0b6f commit a949b40
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
10 changes: 6 additions & 4 deletions afl-fuzz.c
Original file line number Diff line number Diff line change
Expand Up @@ -5581,10 +5581,12 @@ static u8 fuzz_one(char** argv) {
for (stage_cur = 0 ; stage_cur < stage_max ; stage_cur++) {
size_t orig_size = (size_t) len;
size_t mutated_size = custom_mutator(out_buf, orig_size, mutated_buf, max_seed_size, UR(UINT32_MAX));
out_buf = ck_realloc(out_buf, mutated_size);
memcpy(out_buf, mutated_buf, mutated_size);
if (common_fuzz_stuff(argv, out_buf, (u32)mutated_size)) {
goto abandon_entry;
if (mutated_size > 0) {
out_buf = ck_realloc(out_buf, mutated_size);
memcpy(out_buf, mutated_buf, mutated_size);
if (common_fuzz_stuff(argv, out_buf, (u32) mutated_size)) {
goto abandon_entry;
}
}
}

Expand Down
3 changes: 0 additions & 3 deletions libclang_rt.fuzzer_no_main-x86_64.a.syms

This file was deleted.

0 comments on commit a949b40

Please sign in to comment.