Merge remote-tracking branch 'upstream-public/pr/778' into mbedtls-2.7-proposed
This commit is contained in:
commit
c5671bdcf4
7 changed files with 65 additions and 15 deletions
|
@ -1277,6 +1277,9 @@ int mbedtls_pk_parse_key( mbedtls_pk_context *pk,
|
|||
{
|
||||
unsigned char *key_copy;
|
||||
|
||||
if( keylen == 0 )
|
||||
return( MBEDTLS_ERR_PK_KEY_INVALID_FORMAT );
|
||||
|
||||
if( ( key_copy = mbedtls_calloc( 1, keylen ) ) == NULL )
|
||||
return( MBEDTLS_ERR_PK_ALLOC_FAILED );
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue