Fix mbedtls_ecp_curve_info_from_name() for NULL input

This commit is contained in:
Hanno Becker 2018-12-18 23:50:21 +00:00
parent 549e455a42
commit b7a04a7851

View File

@ -505,6 +505,9 @@ const mbedtls_ecp_curve_info *mbedtls_ecp_curve_info_from_name( const char *name
{
const mbedtls_ecp_curve_info *curve_info;
if( name == NULL )
return( NULL );
for( curve_info = mbedtls_ecp_curve_list();
curve_info->grp_id != MBEDTLS_ECP_DP_NONE;
curve_info++ )