summaryrefslogtreecommitdiffstats
path: root/ssl/s3_clnt.c
diff options
context:
space:
mode:
authorNils Larsch <nils@openssl.org>2005-04-29 20:10:06 +0000
committerNils Larsch <nils@openssl.org>2005-04-29 20:10:06 +0000
commit7c7667b86b481c7516d147cd50ece203d3eb58ab (patch)
tree8deb77933dbb0e2839b3270bfee9a7a3b3571cf1 /ssl/s3_clnt.c
parent38be5db93ba435df8d2fbb1caee608ff2266de24 (diff)
check return value of RAND_pseudo_bytes; backport from the stable branch
Diffstat (limited to 'ssl/s3_clnt.c')
-rw-r--r--ssl/s3_clnt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ssl/s3_clnt.c b/ssl/s3_clnt.c
index b40571dd5a..fc376cb04d 100644
--- a/ssl/s3_clnt.c
+++ b/ssl/s3_clnt.c
@@ -552,7 +552,8 @@ int ssl3_client_hello(SSL *s)
p=s->s3->client_random;
Time=time(NULL); /* Time */
l2n(Time,p);
- RAND_pseudo_bytes(p,SSL3_RANDOM_SIZE-4);
+ if (RAND_pseudo_bytes(p,SSL3_RANDOM_SIZE-4) <= 0)
+ goto err;
/* Do the message type and length last */
d=p= &(buf[4]);