]> asedeno.scripts.mit.edu Git - PuTTY_svn.git/commitdiff
Presence of unexpected characters in the proxy exclude list causes a
authorSimon Tatham <anakin@pobox.com>
Thu, 2 Jan 2003 10:07:17 +0000 (10:07 +0000)
committerSimon Tatham <anakin@pobox.com>
Thu, 2 Jan 2003 10:07:17 +0000 (10:07 +0000)
tight loop in proxy_for_destination(). Fixed.

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

proxy.c

diff --git a/proxy.c b/proxy.c
index d43ad7b47c10407f31cd7a4efb9d064cb5116399..30a16c5c2f23ee8fe2d86d067b7554d82e553a50 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 */