diff options
author | van Hauser <vh@thc.org> | 2024-10-07 10:12:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-07 10:12:51 +0200 |
commit | c1e40c5fb7de40dc5f598c609c907ea21e5a078a (patch) | |
tree | 1e9da5807fa20692820bf9792b4a42f9731aeeff /src/afl-fuzz-init.c | |
parent | d21fb1a558b25c4f46692fa999c0028dfe0eecc0 (diff) | |
parent | d6a2edb42a680b999256d5b78082975713973db7 (diff) | |
download | afl++-c1e40c5fb7de40dc5f598c609c907ea21e5a078a.tar.gz |
Merge pull request #2220 from AFLplusplus/dev
push to stable
Diffstat (limited to 'src/afl-fuzz-init.c')
-rw-r--r-- | src/afl-fuzz-init.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/afl-fuzz-init.c b/src/afl-fuzz-init.c index 9eaa661d..a9397232 100644 --- a/src/afl-fuzz-init.c +++ b/src/afl-fuzz-init.c @@ -1237,19 +1237,26 @@ void perform_dry_run(afl_state_t *afl) { u8 crash_log_fn[PATH_MAX]; snprintf(crash_log_fn, PATH_MAX, "%s.log", crash_fn); - fd = open(crash_log_fn, O_WRONLY | O_CREAT | O_EXCL, DEFAULT_PERMISSION); - if (unlikely(fd < 0)) { PFATAL("Unable to create '%s'", crash_log_fn); } + fd = open(crash_log_fn, O_WRONLY | O_CREAT | O_EXCL, + DEFAULT_PERMISSION); + if (unlikely(fd < 0)) { + + PFATAL("Unable to create '%s'", crash_log_fn); + + } u32 nyx_aux_string_len = afl->fsrv.nyx_handlers->nyx_get_aux_string( afl->fsrv.nyx_runner, afl->fsrv.nyx_aux_string, afl->fsrv.nyx_aux_string_len); - ck_write(fd, afl->fsrv.nyx_aux_string, nyx_aux_string_len, crash_log_fn); + ck_write(fd, afl->fsrv.nyx_aux_string, nyx_aux_string_len, + crash_log_fn); close(fd); } + #endif - + afl->last_crash_time = get_cur_time(); afl->last_crash_execs = afl->fsrv.total_execs; @@ -2905,6 +2912,7 @@ void check_binary(afl_state_t *afl, u8 *fname) { afl->fsrv.target_path); } + #endif if (stat(afl->fsrv.target_path, &st) || !S_ISREG(st.st_mode) || |