aboutsummaryrefslogtreecommitdiffstats
path: root/cipher/random.c
diff options
context:
space:
mode:
Diffstat (limited to 'cipher/random.c')
-rw-r--r--cipher/random.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/cipher/random.c b/cipher/random.c
index 32415bd0b..699f76994 100644
--- a/cipher/random.c
+++ b/cipher/random.c
@@ -395,6 +395,8 @@ read_random_source( byte *buffer, size_t length, int level )
while( length ) {
nbytes = length;
goodness = (*fnc)( buffer, &nbytes, level );
+ if( goodness < 0 )
+ log_fatal("No way to gather entropy for the RNG\n");
buffer +=nbytes;
length -= nbytes;
/* FIXME: how can we handle the goodness */