about summary refs log tree commit diff
path: root/include/afl-fuzz.h
diff options
context:
space:
mode:
authorDominik Maier <domenukk@gmail.com>2020-08-31 12:26:41 +0200
committerDominik Maier <domenukk@gmail.com>2020-08-31 12:26:41 +0200
commit4697e4a5a519043b5727202c39a5e13c277e1cae (patch)
tree5efe49aa07c4b4aaf8604db88905bdd688f9859c /include/afl-fuzz.h
parent92b1f9cf36e7df8ce4b957e503cffca7296da048 (diff)
parentbbf00204eacfd0444257e81397f2e76ab90be41d (diff)
downloadafl++-4697e4a5a519043b5727202c39a5e13c277e1cae.tar.gz
description for AFL_MAX_DET_EXTRAS added
Diffstat (limited to 'include/afl-fuzz.h')
-rw-r--r--include/afl-fuzz.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/include/afl-fuzz.h b/include/afl-fuzz.h
index 964f369d..f3a76492 100644
--- a/include/afl-fuzz.h
+++ b/include/afl-fuzz.h
@@ -1027,13 +1027,17 @@ static inline u32 rand_below(afl_state_t *afl, u32 limit) {
 
   }
 
-  /* Modulo is biased - we don't want our fuzzing to be biased so let's do it right, see
-  https://stackoverflow.com/questions/10984974/why-do-people-say-there-is-modulo-bias-when-using-a-random-number-generator
-  */
-  u64 unbiased_rnd; 
+  /* Modulo is biased - we don't want our fuzzing to be biased so let's do it
+   right. See:
+   https://stackoverflow.com/questions/10984974/why-do-people-say-there-is-modulo-bias-when-using-a-random-number-generator
+   */
+  u64 unbiased_rnd;
   do {
+
     unbiased_rnd = rand_next(afl);
+
   } while (unlikely(unbiased_rnd >= (UINT64_MAX - (UINT64_MAX % limit))));
+
   return unbiased_rnd % limit;
 
 }