diff options
author | Matt Caswell <matt@openssl.org> | 2015-08-03 17:20:07 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2015-08-13 20:34:51 +0100 |
commit | f9f6053442a2918d0445866252256b2cb54a1187 (patch) | |
tree | 8df33ad579175275c53fcf23211e1964b4ea6d25 /ssl | |
parent | cc2829e6641092abed8360433dbe67e883fd1cc6 (diff) |
Add missing return check for PACKET_buf_init
The new ClientHello PACKET code is missing a return value check.
Reviewed-by: Emilia Käsper <emilia@openssl.org>
Diffstat (limited to 'ssl')
-rw-r--r-- | ssl/s3_srvr.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ssl/s3_srvr.c b/ssl/s3_srvr.c index acb2fa94bc..c723ea0f2d 100644 --- a/ssl/s3_srvr.c +++ b/ssl/s3_srvr.c @@ -874,7 +874,11 @@ int ssl3_get_client_hello(SSL *s) if (!ok) return ((int)n); s->first_packet = 0; - PACKET_buf_init(&pkt, s->init_msg, n); + if (!PACKET_buf_init(&pkt, s->init_msg, n)) { + SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO, ERR_R_INTERNAL_ERROR); + al = SSL_AD_INTERNAL_ERROR; + goto f_err; + } /* First lets get s->client_version set correctly */ if (RECORD_LAYER_is_sslv2_record(&s->rlayer)) { |