From aee4cc4cbbb29b63c6a81c8bb4d470054b5978d5 Mon Sep 17 00:00:00 2001 From: Hanno Becker Date: Thu, 15 Apr 2021 16:49:32 +0100 Subject: [PATCH] Use sizeof() instead of magic constant Signed-off-by: Hanno Becker --- library/ssl_cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/ssl_cache.c b/library/ssl_cache.c index 3677e5153..6ef1a972c 100644 --- a/library/ssl_cache.c +++ b/library/ssl_cache.c @@ -300,7 +300,7 @@ int mbedtls_ssl_cache_set( void *data, if( ret != 0 ) goto exit; - if( session_id_len > 32 ) + if( session_id_len > sizeof( cur->session_id ) ) { ret = 1; goto exit;