mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2026-01-04 21:56:21 +01:00
Address issues find by manual coverity scan.
This commit is contained in:
parent
9fa2e86d93
commit
0febc80396
3 changed files with 20 additions and 3 deletions
|
|
@ -86,7 +86,7 @@ void mbedtls_debug_print_msg( const mbedtls_ssl_context *ssl, int level,
|
|||
char str[DEBUG_BUF_SIZE];
|
||||
int ret;
|
||||
|
||||
if( ssl->conf == NULL || ssl->conf->f_dbg == NULL || level > debug_threshold )
|
||||
if( NULL == ssl || NULL == ssl->conf || NULL == ssl->conf->f_dbg || level > debug_threshold )
|
||||
return;
|
||||
|
||||
va_start( argp, format );
|
||||
|
|
|
|||
|
|
@ -5773,7 +5773,7 @@ int mbedtls_ssl_set_hs_ecjpake_password( mbedtls_ssl_context *ssl,
|
|||
{
|
||||
mbedtls_ecjpake_role role;
|
||||
|
||||
if( ssl->handshake == NULL && ssl->conf == NULL )
|
||||
if( ssl->handshake == NULL || ssl->conf == NULL )
|
||||
return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA );
|
||||
|
||||
if( ssl->conf->endpoint == MBEDTLS_SSL_IS_SERVER )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue