[PATCH] winhttp: check for endCert being NULL (Coverity)
Marcus Meissner
marcus at jet.franken.de
Sun Dec 6 13:58:14 CST 2009
Can happen if the first context cannot be converted with
X509_to_cert_context(), but the second or another could.
Ciao, Marcus
---
dlls/winhttp/net.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/winhttp/net.c b/dlls/winhttp/net.c
index 3ed3b1b..d46ff2c 100644
--- a/dlls/winhttp/net.c
+++ b/dlls/winhttp/net.c
@@ -355,7 +355,7 @@ static int netconn_secure_verify( int preverify_ok, X509_STORE_CTX *ctx )
CertFreeCertificateContext( context );
}
}
- if (ret)
+ if (ret && endCert)
ret = netconn_verify_cert( endCert, store, server );
CertFreeCertificateContext( endCert );
CertCloseStore( store, 0 );
--
1.5.6
More information about the wine-patches
mailing list