fix symcc custom mutator

This commit is contained in:
vanhauser-thc
2024-05-21 11:04:25 +02:00
parent 4e3cd8ac3f
commit e1521fa8eb
2 changed files with 5 additions and 4 deletions

View File

@ -287,7 +287,7 @@ size_t afl_custom_fuzz(my_mutator_t *data, uint8_t *buf, size_t buf_size,
struct stat st;
u8 * fn = alloc_printf("%s/%s", data->out_dir, nl[i]->d_name);
if (done == 0) {
if (!done) {
if (stat(fn, &st) == 0 && S_ISREG(st.st_mode) && st.st_size) {
@ -299,14 +299,13 @@ size_t afl_custom_fuzz(my_mutator_t *data, uint8_t *buf, size_t buf_size,
*out_buf = data->mutator_buf;
close(fd);
unlink(fn);
done = 1;
}
}
unlink(fn);
}
ck_free(fn);