]> granicus.if.org Git - curl/commitdiff
parse_proxy: make sure portptr is initialized
authorDaniel Stenberg <daniel@haxx.se>
Tue, 28 May 2019 21:50:49 +0000 (23:50 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 28 May 2019 21:50:49 +0000 (23:50 +0200)
Reported-by: Benbuck Nason
fixes #3959

lib/url.c

index 51515c924d3784ea274c5e5504aebce0590a5a2e..086e214e47c8bc0cf826341b8b831b5dc338847f 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -2310,7 +2310,7 @@ static CURLcode parse_proxy(struct Curl_easy *data,
                             struct connectdata *conn, char *proxy,
                             curl_proxytype proxytype)
 {
-  char *portptr;
+  char *portptr = NULL;
   long port = -1;
   char *proxyuser = NULL;
   char *proxypasswd = NULL;