mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-26 01:15:43 +01:00
Prevent arithmetic overflow on bounds check
This commit is contained in:
parent
a1098f81c2
commit
027f84c69f
@ -2489,7 +2489,7 @@ static int ssl_parse_server_key_exchange( mbedtls_ssl_context *ssl )
|
||||
sig_len = ( p[0] << 8 ) | p[1];
|
||||
p += 2;
|
||||
|
||||
if( end != p + sig_len )
|
||||
if( p != end - sig_len )
|
||||
{
|
||||
MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad server key exchange message" ) );
|
||||
mbedtls_ssl_send_alert_message( ssl, MBEDTLS_SSL_ALERT_LEVEL_FATAL,
|
||||
|
Loading…
Reference in New Issue
Block a user