From e1521fa8ebdd2c95ed4f8db6f0835eb3738b3d4c Mon Sep 17 00:00:00 2001 From: vanhauser-thc Date: Tue, 21 May 2024 11:04:25 +0200 Subject: fix symcc custom mutator --- custom_mutators/symcc/symcc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'custom_mutators/symcc') diff --git a/custom_mutators/symcc/symcc.c b/custom_mutators/symcc/symcc.c index 86f23343..154a82bb 100644 --- a/custom_mutators/symcc/symcc.c +++ b/custom_mutators/symcc/symcc.c @@ -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); -- cgit 1.4.1