Skip to content

Commit 475f08a

Browse files
committed
Fix pointer bug with cert
1 parent 337329c commit 475f08a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libmongoc/src/mongoc/mongoc-stream-tls-secure-channel.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -886,7 +886,7 @@ _mongoc_secure_channel_sch_credentials_new(const mongoc_ssl_opt_t *opt, PCCERT_C
886886
cred->dwFlags |= SCH_CRED_NO_SERVERNAME_CHECK;
887887
}
888888

889-
if (cert) {
889+
if (*cert) {
890890
cred->cCreds = 1;
891891
cred->paCred = cert;
892892
}
@@ -935,7 +935,7 @@ _mongoc_secure_channel_schannel_cred_new(const mongoc_ssl_opt_t *opt, PCCERT_CON
935935
cred->dwFlags |= SCH_CRED_NO_SERVERNAME_CHECK;
936936
}
937937

938-
if (cert) {
938+
if (*cert) {
939939
cred->cCreds = 1;
940940
cred->paCred = cert;
941941
}

0 commit comments

Comments
 (0)