[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 | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/dlls/winhttp/net.c b/dlls/winhttp/net.c
index 10176d9..6512db5 100644
--- a/dlls/winhttp/net.c
+++ b/dlls/winhttp/net.c
@@ -359,6 +359,7 @@ static int netconn_secure_verify( int preverify_ok, X509_STORE_CTX *ctx )
CertFreeCertificateContext( context );
}
}
+ if (!endCert) ret = FALSE;
if (ret)
ret = netconn_verify_cert( endCert, store, server );
CertFreeCertificateContext( endCert );
--
1.5.6
More information about the wine-patches
mailing list