summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--random/random-csprng.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/random/random-csprng.c b/random/random-csprng.c
index 332744ba..da50fda7 100644
--- a/random/random-csprng.c
+++ b/random/random-csprng.c
@@ -973,8 +973,8 @@ read_pool (byte *buffer, size_t length, int level)
pool_balance = 0;
needed = length - pool_balance;
- if (needed < POOLSIZE/2)
- needed = POOLSIZE/2;
+ if (needed < 16) /* At least 128 bits. */
+ needed = 16;
else if( needed > POOLSIZE )
BUG ();
read_random_source (RANDOM_ORIGIN_EXTRAPOLL, needed,