Fix missing return value checks
Ensure that all functions have their return values checked where appropriate. This covers all functions defined and called from within libssl. Reviewed-by: Richard Levitte <levitte@openssl.org>
This commit is contained in:
@@ -197,8 +197,10 @@ int ssl3_connect(SSL *s)
|
||||
cb = s->ctx->info_callback;
|
||||
|
||||
s->in_handshake++;
|
||||
if (!SSL_in_init(s) || SSL_in_before(s))
|
||||
SSL_clear(s);
|
||||
if (!SSL_in_init(s) || SSL_in_before(s)) {
|
||||
if(!SSL_clear(s))
|
||||
return -1;
|
||||
}
|
||||
|
||||
#ifndef OPENSSL_NO_HEARTBEATS
|
||||
/*
|
||||
@@ -3044,6 +3046,11 @@ int ssl3_send_client_key_exchange(SSL *s)
|
||||
OPENSSL_cleanse(pms, pmslen);
|
||||
OPENSSL_free(pms);
|
||||
s->cert->pms = NULL;
|
||||
if(s->session->master_key_length < 0) {
|
||||
ssl3_send_alert(s, SSL3_AL_FATAL, SSL_AD_INTERNAL_ERROR);
|
||||
SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE, ERR_R_INTERNAL_ERROR);
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
return n;
|
||||
memerr:
|
||||
|
Reference in New Issue
Block a user