mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-12 10:35:29 +00:00
Remove redundant length-0 checks for incoming unprotected records
This commit is contained in:
parent
1c26845777
commit
408a2742b3
|
@ -4854,8 +4854,7 @@ static int ssl_parse_record_header( mbedtls_ssl_context *ssl )
|
||||||
/* Check length against bounds of the current transform and version */
|
/* Check length against bounds of the current transform and version */
|
||||||
if( ssl->transform_in == NULL )
|
if( ssl->transform_in == NULL )
|
||||||
{
|
{
|
||||||
if( ssl->in_msglen < 1 ||
|
if( ssl->in_msglen > MBEDTLS_SSL_IN_CONTENT_LEN )
|
||||||
ssl->in_msglen > MBEDTLS_SSL_IN_CONTENT_LEN )
|
|
||||||
{
|
{
|
||||||
MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad message length" ) );
|
MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad message length" ) );
|
||||||
return( MBEDTLS_ERR_SSL_INVALID_RECORD );
|
return( MBEDTLS_ERR_SSL_INVALID_RECORD );
|
||||||
|
|
Loading…
Reference in a new issue