summaryrefslogtreecommitdiffstats
path: root/crypto/openssh/openbsd-compat/bsd-arc4random.c
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2003-04-23 16:53:02 +0000
committerdes <des@FreeBSD.org>2003-04-23 16:53:02 +0000
commit85b37b9574631df0f7e774dda373514195c74b29 (patch)
tree70033bf9d0551c1f485a8bf5c04d41148812e33a /crypto/openssh/openbsd-compat/bsd-arc4random.c
parent099d1a58f7bc088a9f71af6d32542ca3949468a3 (diff)
downloadFreeBSD-src-85b37b9574631df0f7e774dda373514195c74b29.zip
FreeBSD-src-85b37b9574631df0f7e774dda373514195c74b29.tar.gz
Vendor import of OpenSSH-portable 3.6.1p1.
Diffstat (limited to 'crypto/openssh/openbsd-compat/bsd-arc4random.c')
-rw-r--r--crypto/openssh/openbsd-compat/bsd-arc4random.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/openssh/openbsd-compat/bsd-arc4random.c b/crypto/openssh/openbsd-compat/bsd-arc4random.c
index ab4e143..dd08130 100644
--- a/crypto/openssh/openbsd-compat/bsd-arc4random.c
+++ b/crypto/openssh/openbsd-compat/bsd-arc4random.c
@@ -25,7 +25,7 @@
#include "includes.h"
#include "log.h"
-RCSID("$Id: bsd-arc4random.c,v 1.5 2002/05/08 22:57:18 tim Exp $");
+RCSID("$Id: bsd-arc4random.c,v 1.6 2003/03/17 05:13:53 djm Exp $");
#ifndef HAVE_ARC4RANDOM
@@ -66,7 +66,7 @@ void arc4random_stir(void)
unsigned char rand_buf[SEED_SIZE];
memset(&rc4, 0, sizeof(rc4));
- if (!RAND_bytes(rand_buf, sizeof(rand_buf)))
+ if (RAND_bytes(rand_buf, sizeof(rand_buf)) <= 0)
fatal("Couldn't obtain random bytes (error %ld)",
ERR_get_error());
RC4_set_key(&rc4, sizeof(rand_buf), rand_buf);
OpenPOWER on IntegriCloud