X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/379836ca8d2a2260899cbbd84d273ddf3e044f74..1b08e5d722504982bf871c6ea97a21a487c86f3e:/proxy.c diff --git a/proxy.c b/proxy.c index d43ad7b4..30a16c5c 100644 --- 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 */