mirror of
https://github.com/cuberite/polarssl.git
synced 2025-09-14 17:47:46 -04:00
Merge pull request #6523 from daverodgman/fix_ssl_zeroize-2.28
Fix zeroization at NULL pointer - 2.28 backport
This commit is contained in:
commit
35e2b2b2bd
3
ChangeLog.d/fix_zeroization.txt
Normal file
3
ChangeLog.d/fix_zeroization.txt
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
Bugfix
|
||||||
|
* Fix possible crash in TLS PRF code, if a failure to allocate memory occurs.
|
||||||
|
Reported by Michael Madsen in #6516.
|
@ -760,7 +760,9 @@ static int tls_prf_generic( mbedtls_md_type_t md_type,
|
|||||||
exit:
|
exit:
|
||||||
mbedtls_md_free( &md_ctx );
|
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_platform_zeroize( h_i, sizeof( h_i ) );
|
||||||
|
|
||||||
mbedtls_free( tmp );
|
mbedtls_free( tmp );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user