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;