Skip to content

Commit 70ec9b3

Browse files
committed
back-port of the bugfix done in #363
1 parent 24aab18 commit 70ec9b3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/prngs/fortuna.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ unsigned long fortuna_read(unsigned char *out, unsigned long outlen, prng_state
288288
}
289289

290290
/* do we have to reseed? */
291-
if (++prng->fortuna.wd == LTC_FORTUNA_WD || prng->fortuna.pool0_len >= 64) {
291+
if ((++prng->fortuna.wd == LTC_FORTUNA_WD) && (prng->fortuna.pool0_len >= 64)) {
292292
if (_fortuna_reseed(prng) != CRYPT_OK) {
293293
goto LBL_UNLOCK;
294294
}

0 commit comments

Comments
 (0)