mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-12 01:58:17 +00:00
fix tmpfile removal
This commit is contained in:
@ -2301,26 +2301,9 @@ stop_fuzzing:
|
||||
afl_fsrv_deinit(&afl->fsrv);
|
||||
|
||||
/* remove tmpfile */
|
||||
if (afl->tmp_dir != NULL && !afl->in_place_resume) {
|
||||
if (afl->tmp_dir != NULL && !afl->in_place_resume && afl->fsrv.out_file) {
|
||||
|
||||
char tmpfile[PATH_MAX];
|
||||
|
||||
if (afl->file_extension) {
|
||||
|
||||
snprintf(tmpfile, PATH_MAX, "%s/.cur_input.%s", afl->tmp_dir,
|
||||
afl->file_extension);
|
||||
|
||||
} else {
|
||||
|
||||
snprintf(tmpfile, PATH_MAX, "%s/.cur_input", afl->tmp_dir);
|
||||
|
||||
}
|
||||
|
||||
if (unlink(tmpfile) != 0) {
|
||||
|
||||
FATAL("Could not unlink current input file: %s.", tmpfile);
|
||||
|
||||
}
|
||||
(void)unlink(afl->fsrv.out_file);
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user