diff options
author | van Hauser <vh@thc.org> | 2024-02-29 14:16:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-29 14:16:07 +0100 |
commit | 31adb57fd7d504a38c80b8465de09b5f96ac2ac6 (patch) | |
tree | cd8738846d3e52564bff3246dc8cd7a0c410391a /src/afl-fuzz-extras.c | |
parent | 7652406c12aad21baceb523752c39bf0216daeb4 (diff) | |
parent | b2b887d04decdcdadf702c585bb1992a0a821bf1 (diff) | |
download | afl++-31adb57fd7d504a38c80b8465de09b5f96ac2ac6.tar.gz |
Merge pull request #2014 from seanm/issue2007
Issue #2007: add filename extension to /crashes files
Diffstat (limited to 'src/afl-fuzz-extras.c')
-rw-r--r-- | src/afl-fuzz-extras.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/afl-fuzz-extras.c b/src/afl-fuzz-extras.c index 3b1d13f1..5735db0c 100644 --- a/src/afl-fuzz-extras.c +++ b/src/afl-fuzz-extras.c @@ -743,7 +743,10 @@ void save_auto(afl_state_t *afl) { for (i = 0; i < MIN((u32)USE_AUTO_EXTRAS, afl->a_extras_cnt); ++i) { u8 *fn = - alloc_printf("%s/queue/.state/auto_extras/auto_%06u", afl->out_dir, i); + alloc_printf("%s/queue/.state/auto_extras/auto_%06u%s%s", afl->out_dir, i, + afl->file_extension ? "." : "", + afl->file_extension ? (const char*)afl->file_extension : ""); + s32 fd; fd = open(fn, O_WRONLY | O_CREAT | O_TRUNC, DEFAULT_PERMISSION); |