From: hno <> Date: Fri, 27 Apr 2001 22:23:48 +0000 (+0000) Subject: Properly handle multiple whitespace in /etc/hosts. Was addning ipcache X-Git-Tag: SQUID_3_0_PRE1~1523 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5d85e00523181d6e75103c3631e9b2b035e80d62;p=thirdparty%2Fsquid.git Properly handle multiple whitespace in /etc/hosts. Was addning ipcache entries with a blank host name. --- diff --git a/src/tools.cc b/src/tools.cc index c9303a850e..e45464a3bb 100644 --- a/src/tools.cc +++ b/src/tools.cc @@ -1,6 +1,6 @@ /* - * $Id: tools.cc,v 1.206 2001/04/14 00:03:24 hno Exp $ + * $Id: tools.cc,v 1.207 2001/04/27 16:23:48 hno Exp $ * * DEBUG: section 21 Misc Functions * AUTHOR: Harvest Derived @@ -992,7 +992,7 @@ parseEtcHosts(void) debug(1, 5) ("etc_hosts: address is '%s'\n", addr); lt = nt + 1; while ((nt = strpbrk(lt, w_space))) { - if (nt - lt == 1) { /* multiple spaces */ + if (nt == lt) { /* multiple spaces */ debug(1, 5) ("etc_hosts: multiple spaces, skipping\n"); lt = nt + 1; continue;