mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-23 16:45:43 +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;
|
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 New Issue
Block a user