diff --git a/ssl/s3_clnt.c b/ssl/s3_clnt.c index 1e437b2e1e9abb36657fc5f73ca0a7567ebccc7f..750217fff6af064615e8c193523123c2388026fe 100644 --- a/ssl/s3_clnt.c +++ b/ssl/s3_clnt.c @@ -719,8 +719,9 @@ int ssl3_client_hello(SSL *s) } else i = 1; - if (i) - ssl_fill_hello_random(s, 0, p, sizeof(s->s3->client_random)); + if (i && ssl_fill_hello_random(s, 0, p, + sizeof(s->s3->client_random)) <= 0) + goto err; /* Do the message type and length last */ d = p = ssl_handshake_start(s);