diff options
| author | Conrad Meyer <cem@FreeBSD.org> | 2019-06-18 18:50:58 +0000 |
|---|---|---|
| committer | Conrad Meyer <cem@FreeBSD.org> | 2019-06-18 18:50:58 +0000 |
| commit | 22eedc9722746206bf2f8b0c5fcdab58917c7bd5 (patch) | |
| tree | 6c0db25dd659d058af4ab54ddff83522365db9fb /sys/dev/random | |
| parent | 5c2b348a547ea9363fa920dcedebb42be194393b (diff) | |
Notes
Diffstat (limited to 'sys/dev/random')
| -rw-r--r-- | sys/dev/random/fortuna.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/random/fortuna.c b/sys/dev/random/fortuna.c index f7f8a753c790..0e66ba3e97f6 100644 --- a/sys/dev/random/fortuna.c +++ b/sys/dev/random/fortuna.c @@ -489,7 +489,7 @@ random_fortuna_genbytes(uint8_t *buf, size_t bytecount, if (!random_chachamode) chunk_size = rounddown(chunk_size, RANDOM_BLOCKSIZE); - while (bytecount >= chunk_size) { + while (bytecount >= chunk_size && chunk_size > 0) { randomdev_keystream(p_key, p_counter, buf, chunk_size); buf += chunk_size; |
