diff --git a/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c b/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c index 8ab4b39e..539ebca6 100644 --- a/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c +++ b/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c @@ -239,7 +239,7 @@ randombytes_sysrandom_uniform(const uint32_t upper_bound) return 0; } min = (uint32_t) (-upper_bound % upper_bound); - for (;;) { + do { r = randombytes_sysrandom(); } while (r < min); /* LCOV_EXCL_LINE */