summaryrefslogtreecommitdiff
path: root/openbsd-compat/bsd-arc4random.c
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2003-09-01 18:42:19 +0000
committerColin Watson <cjwatson@debian.org>2003-09-01 18:42:19 +0000
commit8d6b7f4c46de3feb66f704ab483e51ea1a3bb0e1 (patch)
tree41fe3dd71501bbec5b0393f1536c925eaee180e9 /openbsd-compat/bsd-arc4random.c
parentf045c69060bfdd5cf8759a5f29d7008d02e4de5b (diff)
parent58bfa257481a1c6938ada9bbd38801cc45633fb0 (diff)
Debian release 3.6p1-1.
Diffstat (limited to 'openbsd-compat/bsd-arc4random.c')
-rw-r--r--openbsd-compat/bsd-arc4random.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/openbsd-compat/bsd-arc4random.c b/openbsd-compat/bsd-arc4random.c
index ab4e1431e..dd08130d5 100644
--- a/openbsd-compat/bsd-arc4random.c
+++ b/openbsd-compat/bsd-arc4random.c
@@ -25,7 +25,7 @@
25#include "includes.h" 25#include "includes.h"
26#include "log.h" 26#include "log.h"
27 27
28RCSID("$Id: bsd-arc4random.c,v 1.5 2002/05/08 22:57:18 tim Exp $"); 28RCSID("$Id: bsd-arc4random.c,v 1.6 2003/03/17 05:13:53 djm Exp $");
29 29
30#ifndef HAVE_ARC4RANDOM 30#ifndef HAVE_ARC4RANDOM
31 31
@@ -66,7 +66,7 @@ void arc4random_stir(void)
66 unsigned char rand_buf[SEED_SIZE]; 66 unsigned char rand_buf[SEED_SIZE];
67 67
68 memset(&rc4, 0, sizeof(rc4)); 68 memset(&rc4, 0, sizeof(rc4));
69 if (!RAND_bytes(rand_buf, sizeof(rand_buf))) 69 if (RAND_bytes(rand_buf, sizeof(rand_buf)) <= 0)
70 fatal("Couldn't obtain random bytes (error %ld)", 70 fatal("Couldn't obtain random bytes (error %ld)",
71 ERR_get_error()); 71 ERR_get_error());
72 RC4_set_key(&rc4, sizeof(rand_buf), rand_buf); 72 RC4_set_key(&rc4, sizeof(rand_buf), rand_buf);