mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-11 18:45:28 +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 );
|
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_msglen = rec.data_len;
|
||||||
ssl->in_len[0] = (unsigned char)( rec.data_len >> 8 );
|
ssl->in_len[0] = (unsigned char)( rec.data_len >> 8 );
|
||||||
|
|
Loading…
Reference in a new issue