aboutsummaryrefslogtreecommitdiff
path: root/include
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 /include
parent1fc0731604c1ea1abb38ab345d9046a6f1e9b7de (diff)
downloadafl++-e313180e4d3f7ba44b773e43af40d4af21088576.tar.gz
fix for clang
Diffstat (limited to 'include')
-rw-r--r--include/afl-mutations.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/afl-mutations.h b/include/afl-mutations.h
index 9188a37f..cc913fb0 100644
--- a/include/afl-mutations.h
+++ b/include/afl-mutations.h
@@ -1231,7 +1231,7 @@ inline u32 afl_mutate(afl_state_t *afl, u8 *buf, u32 len, u32 steps,
for (u32 step = 0; step < steps; ++step) {
- retry_havoc_step:
+ retry_havoc_step : {
u32 r = rand_below(afl, MUT_STRATEGY_ARRAY_SIZE), item;
@@ -1667,10 +1667,10 @@ inline u32 afl_mutate(afl_state_t *afl, u8 *buf, u32 len, u32 steps,
if (unlikely(len < 4)) { break; } // no retry
- u32 len = choose_block_len(afl, len - 1);
- u32 off = rand_below(afl, len - len + 1);
+ u32 blen = choose_block_len(afl, len - 1);
+ u32 off = rand_below(afl, len - blen + 1);
- for (u32 i = len - 1; i > 0; i--) {
+ for (u32 i = blen - 1; i > 0; i--) {
u32 j;
do {
@@ -2030,6 +2030,8 @@ inline u32 afl_mutate(afl_state_t *afl, u8 *buf, u32 len, u32 steps,
}
+ }
+
return len;
}