about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2023-04-05 10:32:37 +0200
committervanhauser-thc <vh@thc.org>2023-04-05 10:32:37 +0200
commite313180e4d3f7ba44b773e43af40d4af21088576 (patch)
treef5cfec11b5624479589e3d40fb0d42f6c7166460 /src
parent1fc0731604c1ea1abb38ab345d9046a6f1e9b7de (diff)
downloadafl++-e313180e4d3f7ba44b773e43af40d4af21088576.tar.gz
fix for clang
Diffstat (limited to 'src')
-rw-r--r--src/afl-fuzz-one.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/afl-fuzz-one.c b/src/afl-fuzz-one.c
index 48aa6eb0..e6ff1d1a 100644
--- a/src/afl-fuzz-one.c
+++ b/src/afl-fuzz-one.c
@@ -2139,8 +2139,8 @@ havoc_stage:
 
         LIST_FOREACH(&afl->custom_mutator_list, struct custom_mutator, {
 
-          if (el->stacked_custom &&
-              rand_below(afl, 100) < el->stacked_custom_prob) {
+          if (unlikely(el->stacked_custom &&
+                       rand_below(afl, 100) < el->stacked_custom_prob)) {
 
             u8    *custom_havoc_buf = NULL;
             size_t new_len = el->afl_custom_havoc_mutation(
@@ -2170,7 +2170,8 @@ havoc_stage:
 
       }
 
-    retry_havoc_step:
+    retry_havoc_step : {
+
       u32 r = rand_below(afl, MUT_STRATEGY_ARRAY_SIZE), item;
 
       switch (mutation_array[r]) {
@@ -3250,6 +3251,8 @@ havoc_stage:
 
     }
 
+    }
+
     if (common_fuzz_stuff(afl, out_buf, temp_len)) { goto abandon_entry; }
 
     /* out_buf might have been mangled a bit, so let's restore it to its