mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-12-25 06:45:39 +00:00
Remove redundant minimum length check
Availability of sufficient incoming data should be checked when it is needed, which is in mbedtls_ssl_fetch_input(), and this function has the necessary bounds checks in place.
This commit is contained in:
parent
6d3db0fa25
commit
8244cfa8bc
|
@ -4879,17 +4879,6 @@ static int ssl_parse_record_header( mbedtls_ssl_context *ssl )
|
||||||
}
|
}
|
||||||
#endif /* MBEDTLS_SSL_PROTO_DTLS */
|
#endif /* MBEDTLS_SSL_PROTO_DTLS */
|
||||||
|
|
||||||
|
|
||||||
/* Check length against bounds of the current transform and version */
|
|
||||||
if( ssl->transform_in != NULL )
|
|
||||||
{
|
|
||||||
if( ssl->in_msglen < ssl->transform_in->minlen )
|
|
||||||
{
|
|
||||||
MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad message length" ) );
|
|
||||||
return( MBEDTLS_ERR_SSL_INVALID_RECORD );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return( 0 );
|
return( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue