]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Properly handle multiple whitespace in /etc/hosts. Was addning ipcache
authorhno <>
Fri, 27 Apr 2001 22:23:48 +0000 (22:23 +0000)
committerhno <>
Fri, 27 Apr 2001 22:23:48 +0000 (22:23 +0000)
entries with a blank host name.

src/tools.cc

index c9303a850e2fb5690972282eb8ad80d28e523299..e45464a3bb4e7a50952d745b8638c6ee23210649 100644 (file)
@@ -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;