summaryrefslogtreecommitdiffstats
path: root/crypto/openssl/crypto/bio/bf_nbio.c
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2015-06-11 19:00:55 +0000
committerjkim <jkim@FreeBSD.org>2015-06-11 19:00:55 +0000
commitd675e841ef78a78bab5972d63fa3d8d15ecdbb19 (patch)
treeaf421c8f5f156e1b4b26149d5c4964d037dd0454 /crypto/openssl/crypto/bio/bf_nbio.c
parentaec7d82113b7de83f7ac3f9470fde49813358dec (diff)
downloadFreeBSD-src-d675e841ef78a78bab5972d63fa3d8d15ecdbb19.zip
FreeBSD-src-d675e841ef78a78bab5972d63fa3d8d15ecdbb19.tar.gz
Merge OpenSSL 1.0.1n.
Diffstat (limited to 'crypto/openssl/crypto/bio/bf_nbio.c')
-rw-r--r--crypto/openssl/crypto/bio/bf_nbio.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/crypto/openssl/crypto/bio/bf_nbio.c b/crypto/openssl/crypto/bio/bf_nbio.c
index da88a8a..a04f32a 100644
--- a/crypto/openssl/crypto/bio/bf_nbio.c
+++ b/crypto/openssl/crypto/bio/bf_nbio.c
@@ -139,7 +139,8 @@ static int nbiof_read(BIO *b, char *out, int outl)
BIO_clear_retry_flags(b);
#if 1
- RAND_pseudo_bytes(&n, 1);
+ if (RAND_pseudo_bytes(&n, 1) < 0)
+ return -1;
num = (n & 0x07);
if (outl > num)
@@ -178,7 +179,8 @@ static int nbiof_write(BIO *b, const char *in, int inl)
num = nt->lwn;
nt->lwn = 0;
} else {
- RAND_pseudo_bytes(&n, 1);
+ if (RAND_pseudo_bytes(&n, 1) < 0)
+ return -1;
num = (n & 7);
}
OpenPOWER on IntegriCloud