mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-10 09:11:34 +00:00
less allocs
This commit is contained in:
parent
b7f3d180aa
commit
762421b355
@ -33,16 +33,16 @@ void write_stats_file(afl_state_t *afl, double bitmap_cvg, double stability,
|
||||
struct rusage rus;
|
||||
|
||||
unsigned long long int cur_time = get_cur_time();
|
||||
u8 * fn = alloc_printf("%s/fuzzer_stats", afl->out_dir);
|
||||
u8 fn[PATH_MAX];
|
||||
s32 fd;
|
||||
FILE * f;
|
||||
|
||||
snprintf(fn, PATH_MAX, "%s/fuzzer_stats", afl->out_dir);
|
||||
|
||||
fd = open(fn, O_WRONLY | O_CREAT | O_TRUNC, 0600);
|
||||
|
||||
if (fd < 0) PFATAL("Unable to create '%s'", fn);
|
||||
|
||||
ck_free(fn);
|
||||
|
||||
f = fdopen(fd, "w");
|
||||
|
||||
if (!f) PFATAL("fdopen() failed");
|
||||
|
Loading…
x
Reference in New Issue
Block a user