From b7a04a785176512f32805e9901e30a76fbb68a50 Mon Sep 17 00:00:00 2001 From: Hanno Becker Date: Tue, 18 Dec 2018 23:50:21 +0000 Subject: [PATCH] Fix mbedtls_ecp_curve_info_from_name() for NULL input --- library/ecp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/library/ecp.c b/library/ecp.c index beab9c4c3..ecea5910e 100644 --- a/library/ecp.c +++ b/library/ecp.c @@ -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++ )