From b2b76dcef401eecb5220b070f8256434aea17fc5 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Tue, 25 May 2010 18:36:02 +0200 Subject: [PATCH] Ignore zero length domains in no_proxy. --- src/ChangeLog | 2 ++ src/host.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index a476e7cd..82a339c3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2010-05-25 Giuseppe Scrivano + * host.c (sufmatch): Do not consider zero length entries. + * http.c (H_10X): New macro. (gethttp): Silently ignore 1xx responses. diff --git a/src/host.c b/src/host.c index c6e42acd..df8bdda0 100644 --- a/src/host.c +++ b/src/host.c @@ -874,6 +874,9 @@ sufmatch (const char **list, const char *what) lw = strlen (what); for (i = 0; list[i]; i++) { + if (list[i][0] == '\0') + continue; + for (j = strlen (list[i]), k = lw; j >= 0 && k >= 0; j--, k--) if (c_tolower (list[i][j]) != c_tolower (what[k])) break; -- 2.39.2