diff options
author | vanhauser-thc <vh@thc.org> | 2021-05-26 22:55:21 +0200 |
---|---|---|
committer | vanhauser-thc <vh@thc.org> | 2021-05-26 22:55:21 +0200 |
commit | 0aeb871ac95b35d741628069a487e843369c1ab0 (patch) | |
tree | ef186fd47a46299cc3e522cb32aeab8cd683372c /src | |
parent | 2af9a634d6585709a01edde5ee6aa08b7b3fa9f4 (diff) | |
download | afl++-0aeb871ac95b35d741628069a487e843369c1ab0.tar.gz |
fix tmpfile removal
Diffstat (limited to 'src')
-rw-r--r-- | src/afl-fuzz.c | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/src/afl-fuzz.c b/src/afl-fuzz.c index 4cd38d78..a3a623d9 100644 --- a/src/afl-fuzz.c +++ b/src/afl-fuzz.c @@ -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); } |