about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2024-02-29 09:10:22 +0100
committervanhauser-thc <vh@thc.org>2024-02-29 09:10:29 +0100
commit036a79268b48a0e3e061d5e3387711f69bed8d56 (patch)
tree0488b09ebbb8f676f88d29530b56e83b99f60a36 /src
parent603136efa032d62eec14720a7435ce0a6d143bb6 (diff)
downloadafl++-036a79268b48a0e3e061d5e3387711f69bed8d56.tar.gz
gcc cmplog fix
Diffstat (limited to 'src')
-rw-r--r--src/afl-cc.c3
-rw-r--r--src/afl-fuzz.c14
2 files changed, 8 insertions, 9 deletions
diff --git a/src/afl-cc.c b/src/afl-cc.c
index 6aa0da6a..faa46103 100644
--- a/src/afl-cc.c
+++ b/src/afl-cc.c
@@ -828,7 +828,8 @@ static void instrument_mode_old_environ(aflcc_state_t *aflcc) {
   }
 
   if (getenv("AFL_LLVM_CTX")) aflcc->instrument_opt_mode |= INSTRUMENT_OPT_CTX;
-  if (getenv("AFL_LLVM_CALLER") || getenv("AFL_LLVM_LTO_CALLER") || getenv("AFL_LLVM_LTO_CTX"))
+  if (getenv("AFL_LLVM_CALLER") || getenv("AFL_LLVM_LTO_CALLER") ||
+      getenv("AFL_LLVM_LTO_CTX"))
     aflcc->instrument_opt_mode |= INSTRUMENT_OPT_CALLER;
 
   if (getenv("AFL_LLVM_NGRAM_SIZE")) {
diff --git a/src/afl-fuzz.c b/src/afl-fuzz.c
index 08f716fa..443d93b0 100644
--- a/src/afl-fuzz.c
+++ b/src/afl-fuzz.c
@@ -2493,17 +2493,15 @@ int main(int argc, char **argv_orig, char **envp) {
 
       for (entry = 0; entry < afl->queued_items; ++entry)
         if (!afl->queue_buf[entry]->disabled)
-          if ((afl->queue_buf[entry]->exec_us/1000) > max_ms)
-            max_ms = afl->queue_buf[entry]->exec_us/1000;
-      
+          if ((afl->queue_buf[entry]->exec_us / 1000) > max_ms)
+            max_ms = afl->queue_buf[entry]->exec_us / 1000;
+
       // Add 20% as a safety margin, capped to exec_tmout given in -t option
       max_ms *= 1.2;
-      if(max_ms > afl->fsrv.exec_tmout)
-        max_ms = afl->fsrv.exec_tmout;
-      
+      if (max_ms > afl->fsrv.exec_tmout) max_ms = afl->fsrv.exec_tmout;
+
       // Ensure that there is a sensible timeout even for very fast binaries
-      if(max_ms < 5)
-        max_ms = 5;
+      if (max_ms < 5) max_ms = 5;
 
       afl->fsrv.exec_tmout = max_ms;
       afl->timeout_given = 1;