mirror of
https://github.com/yuzu-mirror/mbedtls.git
synced 2025-12-06 07:12:32 +01:00
Merge pull request #6186 from leorosen/ssl_tls_null_on_invalid_code
ssl_tls: avoid the appearance of a potential NULL dereferencing
This commit is contained in:
commit
8a9f88899d
|
|
@ -7286,7 +7286,7 @@ static tls_prf_fn ssl_tls12prf_from_cs( int ciphersuite_id )
|
|||
const mbedtls_ssl_ciphersuite_t * const ciphersuite_info =
|
||||
mbedtls_ssl_ciphersuite_from_id( ciphersuite_id );
|
||||
|
||||
if( ciphersuite_info->mac == MBEDTLS_MD_SHA384 )
|
||||
if( ciphersuite_info != NULL && ciphersuite_info->mac == MBEDTLS_MD_SHA384 )
|
||||
return( tls_prf_sha384 );
|
||||
#else
|
||||
(void) ciphersuite_id;
|
||||
|
|
|
|||
Loading…
Reference in a new issue