mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-02-04 05:41:39 +00:00
Add hard assertion to ssl_read_record
This commit adds a hard assertion to mbedtls_ssl_read_record triggering if both ssl->in_hslen and ssl->in_offt are not 0. This should never happen, and if it does, there's no sensible way of telling whether the previous message was a handshake or an application data message.
This commit is contained in:
parent
d37839e3fa
commit
1bf86b7e32
|
@ -2180,6 +2180,12 @@ int ssl_read_record( ssl_context *ssl )
|
|||
|
||||
if( ssl->in_hslen != 0 )
|
||||
{
|
||||
if( ssl->in_offt != NULL )
|
||||
{
|
||||
SSL_DEBUG_MSG( 1, ( "should never happen" ) );
|
||||
return( POLARSSL_ERR_SSL_INTERNAL_ERROR );
|
||||
}
|
||||
|
||||
/*
|
||||
* Get next Handshake message in the current record
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue