diff options
author | hexcoder- <heiko@hexco.de> | 2020-02-19 02:13:50 +0100 |
---|---|---|
committer | hexcoder- <heiko@hexco.de> | 2020-02-19 02:13:50 +0100 |
commit | 3beee6da772f88f1bd7987b4b2e7c56a53ec3270 (patch) | |
tree | 2e9cbb09322c058bd2d48831062bc3cec298663d /src/afl-showmap.c | |
parent | 16a7e4ae681c45aadbba15bd32e7e1b5aeba2226 (diff) | |
parent | def4ad645c0ab450f8502e16117ecc50dcc2f41a (diff) | |
download | afl++-3beee6da772f88f1bd7987b4b2e7c56a53ec3270.tar.gz |
Merge branch 'master' of https://github.com/vanhauser-thc/AFLplusplus
Diffstat (limited to 'src/afl-showmap.c')
-rw-r--r-- | src/afl-showmap.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/afl-showmap.c b/src/afl-showmap.c index 99022983..a46645ab 100644 --- a/src/afl-showmap.c +++ b/src/afl-showmap.c @@ -162,7 +162,7 @@ static void classify_counts(u8* mem, const u8* map) { static void at_exit_handler(void) { - if (out_file) unlink(out_file); /* Ignore errors */ + if (stdin_file) unlink(stdin_file); } @@ -949,7 +949,7 @@ int main(int argc, char** argv, char** envp) { } - stdin_file = alloc_printf("%s/.afl-tmin-temp-%u", use_dir, getpid()); + stdin_file = alloc_printf("%s/.afl-showmap-temp-%u", use_dir, getpid()); unlink(stdin_file); atexit(at_exit_handler); out_fd = open(stdin_file, O_RDWR | O_CREAT | O_EXCL, 0600); @@ -1014,6 +1014,13 @@ int main(int argc, char** argv, char** envp) { tcnt, highest, total, out_file); } + + if (stdin_file) { + + unlink(stdin_file); + stdin_file = NULL; + + } exit(child_crashed * 2 + child_timed_out); |