mirror of
https://github.com/Mbed-TLS/mbedtls-framework.git
synced 2026-10-09 02:07:22 +00:00
Initialize hash_len before using it
Signed-off-by: Gilles Peskine <[email protected]>
This commit is contained in:
+1
-3
@@ -2874,7 +2874,7 @@ int mbedtls_ssl_write_finished( mbedtls_ssl_context *ssl )
|
||||
int mbedtls_ssl_parse_finished( mbedtls_ssl_context *ssl )
|
||||
{
|
||||
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
|
||||
unsigned int hash_len;
|
||||
unsigned int hash_len = 12;
|
||||
unsigned char buf[SSL_MAX_HASH_LEN];
|
||||
|
||||
MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> parse finished" ) );
|
||||
@@ -2896,8 +2896,6 @@ int mbedtls_ssl_parse_finished( mbedtls_ssl_context *ssl )
|
||||
goto exit;
|
||||
}
|
||||
|
||||
hash_len = 12;
|
||||
|
||||
if( ssl->in_msg[0] != MBEDTLS_SSL_HS_FINISHED )
|
||||
{
|
||||
mbedtls_ssl_send_alert_message( ssl, MBEDTLS_SSL_ALERT_LEVEL_FATAL,
|
||||
|
||||
Reference in New Issue
Block a user