From 327b9b7f1ab6f7f09c4bd35ff19e871c06d9a1a2 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Thu, 2 Jan 2003 10:07:17 +0000 Subject: [PATCH] Presence of unexpected characters in the proxy exclude list causes a tight loop in proxy_for_destination(). Fixed. [originally from svn r2415] --- proxy.c | 5 +++++ 1 file changed, 5 insertions(+) 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 */