mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-05-13 17:42:14 +00:00
Correct bounds check in ssl_buffer_message()
The previous bounds check omitted the DTLS handshake header.
This commit is contained in:
parent
e0b150f96b
commit
96a6c69d0c
|
@ -4503,7 +4503,7 @@ static int ssl_buffer_message( mbedtls_ssl_context *ssl )
|
||||||
* This is an implementation-specific limitation
|
* This is an implementation-specific limitation
|
||||||
* and not one from the standard, hence it is not
|
* and not one from the standard, hence it is not
|
||||||
* checked in ssl_check_hs_header(). */
|
* checked in ssl_check_hs_header(). */
|
||||||
if( msg_len > MBEDTLS_SSL_IN_CONTENT_LEN )
|
if( msg_len + 12 > MBEDTLS_SSL_IN_CONTENT_LEN )
|
||||||
{
|
{
|
||||||
/* Ignore message */
|
/* Ignore message */
|
||||||
goto exit;
|
goto exit;
|
||||||
|
|
Loading…
Reference in a new issue