mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-23 06:45:38 +01: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;
|
||||
#endif
|
||||
|
||||
if( *curve == NULL )
|
||||
if( curve == NULL || *curve == NULL )
|
||||
{
|
||||
SSL_DEBUG_MSG( 1, ( "no matching curve for ECDHE" ) );
|
||||
return( POLARSSL_ERR_SSL_NO_CIPHER_CHOSEN );
|
||||
|
Loading…
Reference in New Issue
Block a user