mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-12-23 04:35:28 +00:00
Fix bug in ssl_write_supported_elliptic_curves_ext
Passing invalid curves to mbedtls_ssl_conf_curves caused a crash later in ssl_write_supported_elliptic_curves_ext. #373
This commit is contained in:
parent
4dfecabb97
commit
3f81973a9a
|
@ -7,6 +7,8 @@ Bugfix
|
||||||
arguments where the same (in-place doubling). Found and fixed by Janos
|
arguments where the same (in-place doubling). Found and fixed by Janos
|
||||||
Follath. #309
|
Follath. #309
|
||||||
* Fix issue in Makefile that prevented building using armar. #386
|
* Fix issue in Makefile that prevented building using armar. #386
|
||||||
|
* Fix issue that caused a crash if invalid curves were passed to
|
||||||
|
mbedtls_ssl_conf_curves. #373
|
||||||
|
|
||||||
Changes
|
Changes
|
||||||
* On ARM platforms, when compiling with -O0 with GCC, Clang or armcc5,
|
* On ARM platforms, when compiling with -O0 with GCC, Clang or armcc5,
|
||||||
|
|
|
@ -330,6 +330,12 @@ static void ssl_write_supported_elliptic_curves_ext( ssl_context *ssl,
|
||||||
for( info = ecp_curve_list(); info->grp_id != POLARSSL_ECP_DP_NONE; info++ )
|
for( info = ecp_curve_list(); info->grp_id != POLARSSL_ECP_DP_NONE; info++ )
|
||||||
{
|
{
|
||||||
#endif
|
#endif
|
||||||
|
if( info == NULL )
|
||||||
|
{
|
||||||
|
SSL_DEBUG_MSG( 1, ( "invalid curve in ssl configuration" ) );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
elliptic_curve_len += 2;
|
elliptic_curve_len += 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue