Presence of unexpected characters in the proxy exclude list causes a
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Thu, 2 Jan 2003 10:07:17 +0000 (10:07 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Thu, 2 Jan 2003 10:07:17 +0000 (10:07 +0000)
tight loop in proxy_for_destination(). Fixed.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2415 cda61777-01e9-0310-a592-d414129be87e

proxy.c

diff --git a/proxy.c b/proxy.c
index d43ad7b..30a16c5 100644 (file)
--- a/proxy.c
+++ b/proxy.c
@@ -321,6 +321,11 @@ static int proxy_for_destination (SockAddr addr, char * hostname, int port)
        }
 
        s = e;
+
+       /* Make sure we really have reached the next comma or end-of-string */
+       while (exclude_list[s] &&
+              !isspace(exclude_list[s]) &&
+              exclude_list[s] != ',') s++;
     }
 
     /* no matches in the exclude list, so use the proxy */