Skip to content

Commit 92b1f9c

Browse files
committed
added SO link about rand for clarification
1 parent 33e58c1 commit 92b1f9c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

include/afl-fuzz.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1027,7 +1027,9 @@ static inline u32 rand_below(afl_state_t *afl, u32 limit) {
10271027

10281028
}
10291029

1030-
/* Modulo is biased - we don't want our fuzzing to be biased so let's do it right. */
1030+
/* Modulo is biased - we don't want our fuzzing to be biased so let's do it right, see
1031+
https://stackoverflow.com/questions/10984974/why-do-people-say-there-is-modulo-bias-when-using-a-random-number-generator
1032+
*/
10311033
u64 unbiased_rnd;
10321034
do {
10331035
unbiased_rnd = rand_next(afl);

0 commit comments

Comments
 (0)