From: hno <> Date: Thu, 11 Apr 2002 22:45:28 +0000 (+0000) Subject: Deal with end-of-line comments in ACL definitions, such as used in the X-Git-Tag: SQUID_3_0_PRE1~1103 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=49e3f2fbed513c2924cb56c6924bc4cc67427596;p=thirdparty%2Fsquid.git Deal with end-of-line comments in ACL definitions, such as used in the default Safe_ports definition. --- diff --git a/src/acl.cc b/src/acl.cc index 07b4cfab86..c309460cbc 100644 --- a/src/acl.cc +++ b/src/acl.cc @@ -1,6 +1,6 @@ /* - * $Id: acl.cc,v 1.271 2002/01/13 01:08:43 robertc Exp $ + * $Id: acl.cc,v 1.272 2002/04/11 16:45:28 hno Exp $ * * DEBUG: section 28 Access Control * AUTHOR: Duane Wessels @@ -114,7 +114,9 @@ strtokFile(void) strtok_again: if (!aclFromFile) { t = (strtok(NULL, w_space)); - if (t && (*t == '\"' || *t == '\'')) { + if (!t || *t == '#') { + return NULL; + } else if (*t == '\"' || *t == '\'') { /* quote found, start reading from file */ fn = ++t; while (*t && *t != '\"' && *t != '\'')