]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
As reported by 'nodak sodak' we should check for a NULL pointer before
authorDaniel Stenberg <daniel@haxx.se>
Wed, 9 Mar 2005 22:13:52 +0000 (22:13 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 9 Mar 2005 22:13:52 +0000 (22:13 +0000)
referencing the proxy name pointer.

lib/url.c

index 42b7350b0a7bf8fa0a26f15e5df9ce665f497c23..a6e60a92a36b51e3fe87f71957602daf86324720 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -1831,7 +1831,7 @@ static int handleSock5Proxy(const char *proxy_name,
       return 1;
     }
     else if (socksreq[1] == 255) {
-      if (proxy_name[0] == 0) {
+      if (!proxy_name || !*proxy_name) {
         failf(conn->data,
               "No authentication method was acceptable. (It is quite likely"
               " that the SOCKS5 server wanted a username/password, since none"