mirror of
https://github.com/curl/curl.git
synced 2026-06-02 00:24:15 +03:00
curl_schannel.c: fix possible dereference of null pointer
This commit is contained in:
parent
0115ec2f13
commit
a703914e60
1 changed files with 6 additions and 0 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue