mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-11 01:31:37 +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;
|
struct rusage rus;
|
||||||
|
|
||||||
unsigned long long int cur_time = get_cur_time();
|
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;
|
s32 fd;
|
||||||
FILE * f;
|
FILE * f;
|
||||||
|
|
||||||
|
snprintf(fn, PATH_MAX, "%s/fuzzer_stats", afl->out_dir);
|
||||||
|
|
||||||
fd = open(fn, O_WRONLY | O_CREAT | O_TRUNC, 0600);
|
fd = open(fn, O_WRONLY | O_CREAT | O_TRUNC, 0600);
|
||||||
|
|
||||||
if (fd < 0) PFATAL("Unable to create '%s'", fn);
|
if (fd < 0) PFATAL("Unable to create '%s'", fn);
|
||||||
|
|
||||||
ck_free(fn);
|
|
||||||
|
|
||||||
f = fdopen(fd, "w");
|
f = fdopen(fd, "w");
|
||||||
|
|
||||||
if (!f) PFATAL("fdopen() failed");
|
if (!f) PFATAL("fdopen() failed");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user