mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-07-07 13:50:35 +00:00
Fix pk_set_type() behaviour for unkown type
This commit is contained in:
parent
14d8564402
commit
c2c90031ec
|
@ -114,7 +114,7 @@ int pk_set_type( pk_context *ctx, pk_type_t type )
|
||||||
size = sizeof( ecdsa_context );
|
size = sizeof( ecdsa_context );
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
size = 0; /* should never be executed */
|
return( POLARSSL_ERR_PK_TYPE_MISMATCH );
|
||||||
|
|
||||||
if( ( ctx->data = malloc( size ) ) == NULL )
|
if( ( ctx->data = malloc( size ) ) == NULL )
|
||||||
return( POLARSSL_ERR_PK_MALLOC_FAILED );
|
return( POLARSSL_ERR_PK_MALLOC_FAILED );
|
||||||
|
|
Loading…
Reference in a new issue