From 97a21567dfbc4cf6b70b1c10b91ca71cc3f0ddfe Mon Sep 17 00:00:00 2001 From: Hanno Becker Date: Wed, 9 Sep 2020 12:57:16 +0100 Subject: [PATCH] Move misplaced comment Signed-off-by: Hanno Becker --- library/ssl_tls13_keys.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/library/ssl_tls13_keys.c b/library/ssl_tls13_keys.c index 88b1b8ad9..2128f838d 100644 --- a/library/ssl_tls13_keys.c +++ b/library/ssl_tls13_keys.c @@ -255,12 +255,14 @@ int mbedtls_ssl_tls1_3_derive_secret( } else { - /* This should never happen since this function is internal - * and the code sets `context_already_hashed` correctly. - * Let's double-check nonetheless to not run at the risk - * of getting a stack overflow. */ if( clen > sizeof(hashed_context) ) + { + /* This should never happen since this function is internal + * and the code sets `context_already_hashed` correctly. + * Let's double-check nonetheless to not run at the risk + * of getting a stack overflow. */ return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); + } memcpy( hashed_context, ctx, clen ); }