diff options
author | Adam Eijdenberg <eijdenberg@google.com> | 2015-08-04 14:59:47 -0700 |
---|---|---|
committer | Adam Eijdenberg <eijdenberg@google.com> | 2015-08-04 15:05:01 -0700 |
commit | 6c3cca5793b1ac57daceb8111d842f954a5ecf6a (patch) | |
tree | ace463549ccc11ef80779ee57730fdd4e4b24d1d /ssl | |
parent | e77bdc7310fc8fb9e22fd481a991b3576d128b9f (diff) |
Fix unhandled error condition in sslv2 client hello parsing.
--strict-warnings started showing warnings for this today...
Surely an error should be raised if these reads fail?
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Diffstat (limited to 'ssl')
-rw-r--r-- | ssl/s3_srvr.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ssl/s3_srvr.c b/ssl/s3_srvr.c index b60c96264a..725e3f963d 100644 --- a/ssl/s3_srvr.c +++ b/ssl/s3_srvr.c @@ -1014,6 +1014,9 @@ int ssl3_get_client_hello(SSL *s) if (!PACKET_get_net_2(&pkt, &csl) || !PACKET_get_net_2(&pkt, &sil) || !PACKET_get_net_2(&pkt, &cl)) { + SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO, SSL_R_LENGTH_TOO_SHORT); + al = SSL_AD_DECODE_ERROR; + goto f_err; } if (csl == 0) { |