aboutsummaryrefslogtreecommitdiff
path: root/utils/afl_network_proxy/afl-network-server.c
diff options
context:
space:
mode:
Diffstat (limited to 'utils/afl_network_proxy/afl-network-server.c')
-rw-r--r--utils/afl_network_proxy/afl-network-server.c26
1 files changed, 8 insertions, 18 deletions
diff --git a/utils/afl_network_proxy/afl-network-server.c b/utils/afl_network_proxy/afl-network-server.c
index 3e5e275d..c4a700f4 100644
--- a/utils/afl_network_proxy/afl-network-server.c
+++ b/utils/afl_network_proxy/afl-network-server.c
@@ -12,7 +12,7 @@
Dominik Maier <mail@dmnk.co>
Copyright 2016, 2017 Google Inc. All rights reserved.
- Copyright 2019-2022 AFLplusplus Project. All rights reserved.
+ Copyright 2019-2024 AFLplusplus Project. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -60,7 +60,7 @@
#ifdef USE_DEFLATE
#include <libdeflate.h>
-struct libdeflate_compressor * compressor;
+struct libdeflate_compressor *compressor;
struct libdeflate_decompressor *decompressor;
#endif
@@ -173,6 +173,7 @@ static void set_up_environment(afl_forkserver_t *fsrv) {
}
out_file = alloc_printf("%s/.afl-input-temp-%u", use_dir, getpid());
+ fsrv->out_file = out_file;
}
@@ -194,7 +195,7 @@ static void set_up_environment(afl_forkserver_t *fsrv) {
}
- if (!strstr(x, "symbolize=0")) {
+ if (!getenv("AFL_DEBUG") && !strstr(x, "symbolize=0")) {
FATAL("Custom ASAN_OPTIONS set without symbolize=0 - please fix!");
@@ -213,7 +214,7 @@ static void set_up_environment(afl_forkserver_t *fsrv) {
}
- if (!strstr(x, "symbolize=0")) {
+ if (!getenv("AFL_DEBUG") && !strstr(x, "symbolize=0")) {
FATAL("Custom MSAN_OPTIONS set without symbolize=0 - please fix!");
@@ -221,18 +222,7 @@ static void set_up_environment(afl_forkserver_t *fsrv) {
}
- setenv("ASAN_OPTIONS",
- "abort_on_error=1:"
- "detect_leaks=0:"
- "symbolize=0:"
- "allocator_may_return_null=1",
- 0);
-
- setenv("MSAN_OPTIONS", "exit_code=" STRINGIFY(MSAN_ERROR) ":"
- "symbolize=0:"
- "abort_on_error=1:"
- "allocator_may_return_null=1:"
- "msan_track_origins=0", 0);
+ set_sanitizer_defaults();
if (get_afl_env("AFL_PRELOAD")) {
@@ -387,8 +377,8 @@ int main(int argc, char **argv_orig, char **envp) {
struct sockaddr_in6 serveraddr, clientaddr;
int addrlen = sizeof(clientaddr);
char str[INET6_ADDRSTRLEN];
- char ** argv = argv_cpy_dup(argc, argv_orig);
- u8 * send_buf;
+ char **argv = argv_cpy_dup(argc, argv_orig);
+ u8 *send_buf;
#ifdef USE_DEFLATE
u32 *lenptr;
#endif