Add null check for pms allocation
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
This commit is contained in:
parent
7f1c89d1d4
commit
937b90febf
1 changed files with 2 additions and 0 deletions
|
@ -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…
Reference in a new issue