about summary refs log tree commit diff
path: root/instrumentation/afl-compiler-rt.o.c
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-09-11 08:56:28 +0200
committervan Hauser <vh@thc.org>2020-09-11 08:56:28 +0200
commit862b6d0382a132cc5338cfdcdc2c30c2cd8d578b (patch)
treed324cfafb78efa62de6f65656f7a196ab7e6ccb1 /instrumentation/afl-compiler-rt.o.c
parent543765bc0df02ef7d2db3690383a857ca7963286 (diff)
downloadafl++-862b6d0382a132cc5338cfdcdc2c30c2cd8d578b.tar.gz
fix for afl-compiler-rt to only send dictionary data if there is some
Diffstat (limited to 'instrumentation/afl-compiler-rt.o.c')
-rw-r--r--instrumentation/afl-compiler-rt.o.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/instrumentation/afl-compiler-rt.o.c b/instrumentation/afl-compiler-rt.o.c
index 0e8b97a2..209cc726 100644
--- a/instrumentation/afl-compiler-rt.o.c
+++ b/instrumentation/afl-compiler-rt.o.c
@@ -469,7 +469,8 @@ static void __afl_start_snapshots(void) {
     }
 
     if ((was_killed & (FS_OPT_ENABLED | FS_OPT_AUTODICT)) ==
-        (FS_OPT_ENABLED | FS_OPT_AUTODICT)) {
+            (FS_OPT_ENABLED | FS_OPT_AUTODICT) &&
+        __afl_dictionary_len && __afl_dictionary) {
 
       // great lets pass the dictionary through the forkserver FD
       u32 len = __afl_dictionary_len, offset = 0;
@@ -681,7 +682,8 @@ static void __afl_start_forkserver(void) {
     }
 
     if ((was_killed & (FS_OPT_ENABLED | FS_OPT_AUTODICT)) ==
-        (FS_OPT_ENABLED | FS_OPT_AUTODICT)) {
+            (FS_OPT_ENABLED | FS_OPT_AUTODICT) &&
+        __afl_dictionary_len && __afl_dictionary) {
 
       // great lets pass the dictionary through the forkserver FD
       u32 len = __afl_dictionary_len, offset = 0;