From: Isaac Boukris Date: Sat, 16 Apr 2016 08:49:09 +0000 (+0300) Subject: NTLM: check for NULL pointer before deferencing X-Git-Tag: curl-7_49_0~107 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fa5fa65a309f352284e58f52183d586886eb17ea;p=curl NTLM: check for NULL pointer before deferencing At ConnectionExists, both check->proxyuser and check->proxypasswd could be NULL, so make sure to check first. Fixes #765 --- diff --git a/lib/url.c b/lib/url.c index 184e27049..b50ca8677 100644 --- a/lib/url.c +++ b/lib/url.c @@ -3444,6 +3444,10 @@ ConnectionExists(struct SessionHandle *data, /* Same for Proxy NTLM authentication */ if(wantProxyNTLMhttp) { + /* Both check->proxyuser and check->proxypasswd could be NULL */ + if(check->proxyuser == NULL || check->proxypasswd == NULL) + continue; + if(!strequal(needle->proxyuser, check->proxyuser) || !strequal(needle->proxypasswd, check->proxypasswd)) continue;