mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-12-23 15:45:30 +00:00
Return from ssl_load_buffered_record early if no record is buffered
This commit is contained in:
parent
caf8741891
commit
4cb782d2f6
|
@ -4730,11 +4730,6 @@ static int ssl_load_buffered_record( mbedtls_ssl_context *ssl )
|
|||
if( hs == NULL )
|
||||
return( 0 );
|
||||
|
||||
/* Only consider loading future records if the
|
||||
* input buffer is empty. */
|
||||
if( ssl_another_record_in_datagram( ssl ) == 1 )
|
||||
return( 0 );
|
||||
|
||||
rec = hs->buffering.future_record.data;
|
||||
rec_len = hs->buffering.future_record.len;
|
||||
rec_epoch = hs->buffering.future_record.epoch;
|
||||
|
@ -4742,6 +4737,11 @@ static int ssl_load_buffered_record( mbedtls_ssl_context *ssl )
|
|||
if( rec == NULL )
|
||||
return( 0 );
|
||||
|
||||
/* Only consider loading future records if the
|
||||
* input buffer is empty. */
|
||||
if( ssl_another_record_in_datagram( ssl ) == 1 )
|
||||
return( 0 );
|
||||
|
||||
MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> ssl_load_buffered_record" ) );
|
||||
|
||||
if( rec_epoch != ssl->in_epoch )
|
||||
|
|
Loading…
Reference in a new issue