about summary refs log tree commit diff
path: root/instrumentation/afl-compiler-rt.o.c
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2024-02-04 16:08:57 +0100
committervanhauser-thc <vh@thc.org>2024-02-04 16:08:57 +0100
commit34a3060b0fee900331decce0bae55d4caefafc01 (patch)
tree2fd696275b9bf72364e5116a5576ff410b4c01e5 /instrumentation/afl-compiler-rt.o.c
parentc77709cdd9b50832ed537dfd65d30bc7ffa79e7b (diff)
downloadafl++-34a3060b0fee900331decce0bae55d4caefafc01.tar.gz
config __afl_cmplog_max_len
Diffstat (limited to 'instrumentation/afl-compiler-rt.o.c')
-rw-r--r--instrumentation/afl-compiler-rt.o.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/instrumentation/afl-compiler-rt.o.c b/instrumentation/afl-compiler-rt.o.c
index a154bcf7..c4177b08 100644
--- a/instrumentation/afl-compiler-rt.o.c
+++ b/instrumentation/afl-compiler-rt.o.c
@@ -186,7 +186,7 @@ __thread u32        __afl_prev_ctx;
 struct cmp_map *__afl_cmp_map;
 struct cmp_map *__afl_cmp_map_backup;
 
-static u8 __afl_cmplog_max_len = 16;
+static u8 __afl_cmplog_max_len = 32;  // 16-32
 
 /* Child pid? */
 
@@ -738,6 +738,13 @@ static void __afl_map_shm(void) {
 
   }
 
+  if (getenv("AFL_CMPLOG_MAX_LEN")) {
+
+    int tmp = atoi(getenv("AFL_CMPLOG_MAX_LEN"));
+    if (tmp >= 16 && tmp <= 32) { __afl_cmplog_max_len = tmp; }
+
+  }
+
 }
 
 /* unmap SHM. */