mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-03-29 04:20:12 +00:00
Add null check for pms allocation
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
This commit is contained in:
parent
7f1c89d1d4
commit
937b90febf
@ -5284,6 +5284,8 @@ static psa_status_t psa_tls12_prf_psk_to_ms_set_key(
|
||||
return( PSA_ERROR_INVALID_ARGUMENT );
|
||||
|
||||
uint8_t *pms = mbedtls_calloc( 1, pms_len );
|
||||
if( pms == NULL )
|
||||
return( PSA_ERROR_INSUFFICIENT_MEMORY );
|
||||
uint8_t *cur = pms;
|
||||
|
||||
/* pure-PSK:
|
||||
|
Loading…
x
Reference in New Issue
Block a user