mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-11 15:45:31 +00:00
Double check that record expansion is as expected during decryption
This commit is contained in:
parent
a795323cd5
commit
93012fe8e8
|
@ -4340,6 +4340,11 @@ static int ssl_prepare_record_content( mbedtls_ssl_context *ssl )
|
|||
return( ret );
|
||||
}
|
||||
|
||||
if( ssl->in_iv + rec.data_offset != ssl->in_msg )
|
||||
{
|
||||
/* Should never happen */
|
||||
return( MBEDTLS_ERR_SSL_INTERNAL_ERROR );
|
||||
}
|
||||
|
||||
ssl->in_msglen = rec.data_len;
|
||||
ssl->in_len[0] = (unsigned char)( rec.data_len >> 8 );
|
||||
|
|
Loading…
Reference in a new issue