check return value of RAND_pseudo_bytes; backport from the stable branch

This commit is contained in:
Nils Larsch
2005-04-29 20:10:06 +00:00
parent 38be5db93b
commit 7c7667b86b
7 changed files with 24 additions and 23 deletions

View File

@@ -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]);