mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-02-03 04:41:14 +00:00
Fix potential NULL dereference on bad usage
This commit is contained in:
parent
b26b75e17b
commit
8e8ae3d961
|
@ -2595,7 +2595,7 @@ curve_matching_done:
|
||||||
curve = ssl->handshake->curves;
|
curve = ssl->handshake->curves;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if( *curve == NULL )
|
if( curve == NULL || *curve == NULL )
|
||||||
{
|
{
|
||||||
SSL_DEBUG_MSG( 1, ( "no matching curve for ECDHE" ) );
|
SSL_DEBUG_MSG( 1, ( "no matching curve for ECDHE" ) );
|
||||||
return( POLARSSL_ERR_SSL_NO_CIPHER_CHOSEN );
|
return( POLARSSL_ERR_SSL_NO_CIPHER_CHOSEN );
|
||||||
|
|
Loading…
Reference in a new issue