commit | b5609f3ca55628f6b88ddc863569cf54ce383471 | [log] [tgz] |
---|---|---|
author | Krzysztof Stachowiak <krzysiek.stachowiak@gmail.com> | Wed Mar 14 11:41:47 2018 +0100 |
committer | Krzysztof Stachowiak <krzysiek.stachowiak@gmail.com> | Wed Mar 14 11:41:47 2018 +0100 |
tree | 29ba2f47927e1f46397c695f31b2b951fecc9f2f | |
parent | b3e8f9e2e6d6ac4314d8a8a754e684f5bdae7183 [diff] [blame] |
Prevent arithmetic overflow on bould check
diff --git a/library/ssl_cli.c b/library/ssl_cli.c index 54a290c..2eec766 100644 --- a/library/ssl_cli.c +++ b/library/ssl_cli.c
@@ -2488,7 +2488,7 @@ 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,