mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-22 11:45:42 +01:00
Potential memory leak in ssl_ticket_keys_init()
This commit is contained in:
parent
452f6ba1a6
commit
6f0636a09f
@ -21,6 +21,7 @@ Bugfix
|
||||
* SSL now gracefully handles missing RNG
|
||||
* Missing defines / cases for RSA_PSK key exchange
|
||||
* crypt_and_hash app checks MAC before final decryption
|
||||
* Potential memory leak in ssl_ticket_keys_init()
|
||||
|
||||
= PolarSSL 1.3.2 released on 2013-11-04
|
||||
Features
|
||||
|
@ -3449,17 +3449,24 @@ static int ssl_ticket_keys_init( ssl_context *ssl )
|
||||
return( POLARSSL_ERR_SSL_MALLOC_FAILED );
|
||||
|
||||
if( ( ret = ssl->f_rng( ssl->p_rng, tkeys->key_name, 16 ) ) != 0 )
|
||||
{
|
||||
polarssl_free( tkeys );
|
||||
return( ret );
|
||||
}
|
||||
|
||||
if( ( ret = ssl->f_rng( ssl->p_rng, buf, 16 ) ) != 0 ||
|
||||
( ret = aes_setkey_enc( &tkeys->enc, buf, 128 ) ) != 0 ||
|
||||
( ret = aes_setkey_dec( &tkeys->dec, buf, 128 ) ) != 0 )
|
||||
{
|
||||
polarssl_free( tkeys );
|
||||
return( ret );
|
||||
}
|
||||
|
||||
if( ( ret = ssl->f_rng( ssl->p_rng, tkeys->mac_key, 16 ) ) != 0 )
|
||||
{
|
||||
polarssl_free( tkeys );
|
||||
return( ret );
|
||||
}
|
||||
|
||||
ssl->ticket_keys = tkeys;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user