commit | 29b9b2b699cc4ed27e637a90404a77806cc20e32 | [log] [tgz] |
---|---|---|
author | Dave Rodgman <dave.rodgman@arm.com> | Tue Nov 01 16:08:14 2022 +0000 |
committer | Dave Rodgman <dave.rodgman@arm.com> | Tue Nov 01 16:08:14 2022 +0000 |
tree | 3ecc8498e59dd896ffa41e0a4ab09e8ad91f37b1 | |
parent | 55fd0b9fc1a2a8e0720c8ab15e06cea579aa4f4b [diff] [blame] |
Fix zeroization at NULL pointer Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
diff --git a/library/ssl_tls.c b/library/ssl_tls.c index a49f774..3c91b45 100644 --- a/library/ssl_tls.c +++ b/library/ssl_tls.c
@@ -5635,7 +5635,9 @@ exit: mbedtls_md_free( &md_ctx ); - mbedtls_platform_zeroize( tmp, tmp_len ); + if ( tmp != NULL ) + mbedtls_platform_zeroize( tmp, tmp_len ); + mbedtls_platform_zeroize( h_i, sizeof( h_i ) ); mbedtls_free( tmp );