mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-01-30 15:32:58 +00:00
Remove redundant length-0 checks for incoming unprotected records
This commit is contained in:
parent
31c3b14e37
commit
3be264e2c3
@ -5027,8 +5027,7 @@ static int ssl_parse_record_header( mbedtls_ssl_context *ssl )
|
||||
/* Check length against bounds of the current transform and version */
|
||||
if( ssl->transform_in == NULL )
|
||||
{
|
||||
if( ssl->in_msglen < 1 ||
|
||||
ssl->in_msglen > MBEDTLS_SSL_IN_CONTENT_LEN )
|
||||
if( ssl->in_msglen > MBEDTLS_SSL_IN_CONTENT_LEN )
|
||||
{
|
||||
MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad message length" ) );
|
||||
return( MBEDTLS_ERR_SSL_INVALID_RECORD );
|
||||
|
Loading…
x
Reference in New Issue
Block a user