aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2022-03-04 09:41:21 +0100
committervanhauser-thc <vh@thc.org>2022-03-04 09:41:21 +0100
commit2eeba2dbf085b1c679dc82d59a0ec0ddc2c05429 (patch)
tree1527e76c1adcd77c208c9572a662199f3eb2f9fa /src
parent09123d861731a47cc6474763a0eb5ddd4cc09b6d (diff)
downloadafl++-2eeba2dbf085b1c679dc82d59a0ec0ddc2c05429.tar.gz
code format
Diffstat (limited to 'src')
-rw-r--r--src/afl-forkserver.c5
-rw-r--r--src/afl-fuzz-bitmap.c11
-rw-r--r--src/afl-fuzz.c3
3 files changed, 12 insertions, 7 deletions
diff --git a/src/afl-forkserver.c b/src/afl-forkserver.c
index 54f28852..628ff590 100644
--- a/src/afl-forkserver.c
+++ b/src/afl-forkserver.c
@@ -1257,9 +1257,12 @@ void afl_fsrv_kill(afl_forkserver_t *fsrv) {
#ifdef __linux__
if (fsrv->nyx_mode) {
+
free(fsrv->nyx_aux_string);
- fsrv->nyx_handlers->nyx_shutdown(fsrv->nyx_runner);
+ fsrv->nyx_handlers->nyx_shutdown(fsrv->nyx_runner);
+
}
+
#endif
}
diff --git a/src/afl-fuzz-bitmap.c b/src/afl-fuzz-bitmap.c
index 226dfa5c..a7c77aec 100644
--- a/src/afl-fuzz-bitmap.c
+++ b/src/afl-fuzz-bitmap.c
@@ -772,19 +772,22 @@ save_if_interesting(afl_state_t *afl, void *mem, u32 len, u8 fault) {
close(fd);
#ifdef __linux__
- if(afl->fsrv.nyx_mode && fault == FSRV_RUN_CRASH) {
- u8 fn_log[PATH_MAX];
+ if (afl->fsrv.nyx_mode && fault == FSRV_RUN_CRASH) {
- snprintf(fn_log, PATH_MAX, "%s.log", fn);
+ u8 fn_log[PATH_MAX];
+ snprintf(fn_log, PATH_MAX, "%s.log", fn);
fd = open(fn_log, O_WRONLY | O_CREAT | O_EXCL, DEFAULT_PERMISSION);
if (unlikely(fd < 0)) { PFATAL("Unable to create '%s'", fn_log); }
- u32 nyx_aux_string_len = afl->fsrv.nyx_handlers->nyx_get_aux_string(afl->fsrv.nyx_runner, afl->fsrv.nyx_aux_string, 0x1000);
+ u32 nyx_aux_string_len = afl->fsrv.nyx_handlers->nyx_get_aux_string(
+ afl->fsrv.nyx_runner, afl->fsrv.nyx_aux_string, 0x1000);
ck_write(fd, afl->fsrv.nyx_aux_string, nyx_aux_string_len, fn_log);
close(fd);
+
}
+
#endif
return keeping;
diff --git a/src/afl-fuzz.c b/src/afl-fuzz.c
index df6e5404..da1c7602 100644
--- a/src/afl-fuzz.c
+++ b/src/afl-fuzz.c
@@ -468,8 +468,7 @@ nyx_plugin_handler_t *afl_load_libnyx_plugin(u8 *libnyx_binary) {
dlsym(handle, "nyx_get_bitmap_buffer_size");
if (plugin->nyx_get_bitmap_buffer_size == NULL) { goto fail; }
- plugin->nyx_get_aux_string =
- dlsym(handle, "nyx_get_aux_string");
+ plugin->nyx_get_aux_string = dlsym(handle, "nyx_get_aux_string");
if (plugin->nyx_get_aux_string == NULL) { goto fail; }
OKF("libnyx plugin is ready!");