summaryrefslogtreecommitdiff
path: root/src/mod_mbedtls.c
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2021-02-02 01:06:58 -0500
committerGlenn Strauss <gstrauss@gluelogic.com>2021-02-02 01:06:58 -0500
commitb0439d8fa89f0037bd4de59b3cf461bf1396e28b (patch)
tree3a1f5ef979a68d103c4d6e04515837db0b9519cc /src/mod_mbedtls.c
parent2a557809d97c615a415c1bdff3ebf717c785ae37 (diff)
downloadlighttpd-git-b0439d8fa89f0037bd4de59b3cf461bf1396e28b.tar.gz
[mod_mbedtls] remove redundant condition check
(identified by coverity)
Diffstat (limited to 'src/mod_mbedtls.c')
-rw-r--r--src/mod_mbedtls.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/mod_mbedtls.c b/src/mod_mbedtls.c
index c75b1b79..934317ec 100644
--- a/src/mod_mbedtls.c
+++ b/src/mod_mbedtls.c
@@ -4054,8 +4054,7 @@ static int ssl_parse_client_hello( mbedtls_ssl_context *ssl, handler_ctx *hctx )
ext_len = ( buf[ext_offset + 0] << 8 )
| ( buf[ext_offset + 1] );
- if( ( ext_len > 0 && ext_len < 4 ) ||
- msg_len != ext_offset + 2 + ext_len )
+ if( msg_len != ext_offset + 2 + ext_len )
{
return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO );
}
@@ -4098,11 +4097,6 @@ static int ssl_parse_client_hello( mbedtls_ssl_context *ssl, handler_ctx *hctx )
ext_len -= 4 + ext_size;
ext += 4 + ext_size;
-
- if( ext_len > 0 && ext_len < 4 )
- {
- return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO );
- }
}
#if defined(MBEDTLS_SSL_PROTO_SSL3)
}