about summary refs log tree commit diff
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2023-10-24 11:48:38 +0200
committervanhauser-thc <vh@thc.org>2023-10-24 11:48:38 +0200
commit728401ee690d81a0a73bbb09e3aab271556a5c0a (patch)
tree9afce750fea90eae84dccde77c35056f049d3137
parenteaa6a1754a2efa54903959a5b3ce3d433dcdea37 (diff)
downloadafl++-728401ee690d81a0a73bbb09e3aab271556a5c0a.tar.gz
dict2file to silently return if AFL_LLVM_DICT2FILE not defined
-rw-r--r--instrumentation/afl-llvm-dict2file.so.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/instrumentation/afl-llvm-dict2file.so.cc b/instrumentation/afl-llvm-dict2file.so.cc
index 8ee13010..36d939d9 100644
--- a/instrumentation/afl-llvm-dict2file.so.cc
+++ b/instrumentation/afl-llvm-dict2file.so.cc
@@ -206,7 +206,9 @@ bool AFLdict2filePass::runOnModule(Module &M) {
 
   ptr = getenv("AFL_LLVM_DICT2FILE");
 
-  if (!ptr || *ptr != '/')
+  if (!ptr) { return false; }
+
+  if (*ptr != '/')
     FATAL("AFL_LLVM_DICT2FILE is not set to an absolute path: %s", ptr);
 
   of.open(ptr, std::ofstream::out | std::ofstream::app);