From a4b143a57ccc16243dce5f206e197ce44559955a Mon Sep 17 00:00:00 2001 From: Hanno Becker Date: Wed, 15 Aug 2018 14:01:34 +0100 Subject: [PATCH] Remove nested loop in mbedtls_ssl_read_record() --- library/ssl_tls.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/library/ssl_tls.c b/library/ssl_tls.c index 910e58498..8e209e78a 100644 --- a/library/ssl_tls.c +++ b/library/ssl_tls.c @@ -4294,8 +4294,9 @@ int mbedtls_ssl_read_record( mbedtls_ssl_context *ssl, { do { - do ret = mbedtls_ssl_read_record_layer( ssl ); - while( ret == MBEDTLS_ERR_SSL_CONTINUE_PROCESSING ); + ret = mbedtls_ssl_read_record_layer( ssl ); + if( ret == MBEDTLS_ERR_SSL_CONTINUE_PROCESSING ) + continue; if( ret != 0 ) {