diff options
author | Marc Hoersken <info@marc-hoersken.de> | 2014-04-18 22:36:12 +0200 |
---|---|---|
committer | Marc Hoersken <info@marc-hoersken.de> | 2014-04-18 22:36:12 +0200 |
commit | a703914e60becbc204350df178d4323af8436637 (patch) | |
tree | 562b71a0083b5288fb364e9b79278845b337c370 /lib/vtls | |
parent | 0115ec2f1368338fe4716b16d5d770650ecfb618 (diff) |
curl_schannel.c: fix possible dereference of null pointer
Diffstat (limited to 'lib/vtls')
-rw-r--r-- | lib/vtls/curl_schannel.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/vtls/curl_schannel.c b/lib/vtls/curl_schannel.c index 701fa556c..82e088c7b 100644 --- a/lib/vtls/curl_schannel.c +++ b/lib/vtls/curl_schannel.c @@ -310,6 +310,9 @@ schannel_connect_step2(struct connectdata *conn, int sockindex) infof(data, "schannel: SSL/TLS connection with %s port %hu (step 2/3)\n", conn->host.name, conn->remote_port); + if(!connssl->cred || !connssl->ctxt) + return CURLE_SSL_CONNECT_ERROR; + /* buffer to store previously received and encrypted data */ if(connssl->encdata_buffer == NULL) { connssl->encdata_offset = 0; @@ -508,6 +511,9 @@ schannel_connect_step3(struct connectdata *conn, int sockindex) infof(data, "schannel: SSL/TLS connection with %s port %hu (step 3/3)\n", conn->host.name, conn->remote_port); + if(!connssl->cred) + return CURLE_SSL_CONNECT_ERROR; + /* check if the required context attributes are met */ if(connssl->ret_flags != connssl->req_flags) { if(!(connssl->ret_flags & ISC_RET_SEQUENCE_DETECT)) |