Use sizeof() instead of magic constant

Signed-off-by: Hanno Becker <hanno.becker@arm.com>
This commit is contained in:
Hanno Becker 2021-04-15 16:49:32 +01:00
parent a5b1a3945b
commit aee4cc4cbb

View file

@ -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;