about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDominik Maier <domenukk@gmail.com>2020-08-26 13:04:03 +0200
committerDominik Maier <domenukk@gmail.com>2020-08-26 13:04:03 +0200
commit4be0ea596b86d4320545859c29bf0454dd765379 (patch)
tree296eefe7ecde30cd3709ec0c0645d19294d859ae
parent96ef7083c84cbd1892233cc36bcc139f77515a19 (diff)
downloadafl++-4be0ea596b86d4320545859c29bf0454dd765379.tar.gz
rand unlikely added
-rw-r--r--include/afl-fuzz.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/afl-fuzz.h b/include/afl-fuzz.h
index 5c391049..c5b01da8 100644
--- a/include/afl-fuzz.h
+++ b/include/afl-fuzz.h
@@ -1031,7 +1031,7 @@ static inline u32 rand_below(afl_state_t *afl, u32 limit) {
   u64 unbiased_rnd; 
   do {
     unbiased_rnd = rand_next(afl);
-  } while (unbiased_rnd >= (UINT64_MAX - (UINT64_MAX % limit)));
+  } while (unlikely(unbiased_rnd >= (UINT64_MAX - (UINT64_MAX % limit))));
   return unbiased_rnd % limit;
 
 }