Minor improvement in ssl_tls13_keys.c

Signed-off-by: Hanno Becker <hanno.becker@arm.com>
This commit is contained in:
Hanno Becker 2020-09-08 11:12:24 +01:00
parent ab2ce23f92
commit 00debc734b

View File

@ -111,7 +111,7 @@ static void ssl_tls1_3_hkdf_encode_label(
/* Add context value */ /* Add context value */
*p++ = (unsigned char)( clen & 0xFF ); *p++ = (unsigned char)( clen & 0xFF );
if( ctx != NULL ) if( clen != 0 )
memcpy( p, ctx, clen ); memcpy( p, ctx, clen );
/* Return total length to the caller. */ /* Return total length to the caller. */