From: Christos Tsantilas Date: Wed, 5 Jun 2013 15:02:11 +0000 (-0600) Subject: Fixed r12859 (Boolean ACLs) bugs related to ACL parsing and dumping: X-Git-Tag: SQUID_3_4_0_1~70 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8984b8cd492fd07aed4dc1a6016afb38f863aed7;p=thirdparty%2Fsquid.git Fixed r12859 (Boolean ACLs) bugs related to ACL parsing and dumping: - BoolOps.cc:94: "false" assertion when parsing ssl_bump directive. - Infinite loop with RAM growth in dump_wordlist when dumping Squid configuration for cache manager. - Segfault on not configured (nil) access lists in dump_acl_access. --- diff --git a/src/cache_cf.cc b/src/cache_cf.cc index 6c04d5295e..b61aaa01f9 100644 --- a/src/cache_cf.cc +++ b/src/cache_cf.cc @@ -1295,7 +1295,7 @@ parseBytesUnits(const char *unit) static void dump_wordlist(StoreEntry * entry, wordlist *words) { - for (wordlist *word = words; word; word = words->next) + for (wordlist *word = words; word; word = word->next) storeAppendPrintf(entry, "%s ", word->key); } @@ -1341,9 +1341,11 @@ dump_acl_list(StoreEntry * entry, ACLList * head) void dump_acl_access(StoreEntry * entry, const char *name, acl_access * head) { - wordlist *lines = head->treeDump(name, NULL); - dump_wordlist(entry, lines); - wordlistDestroy(&lines); + if (head) { + wordlist *lines = head->treeDump(name, NULL); + dump_wordlist(entry, lines); + wordlistDestroy(&lines); + } } static void @@ -4720,10 +4722,10 @@ static void parse_sslproxy_ssl_bump(acl_access **ssl_bump) bumpCfgStyleLast = bumpCfgStyleNow; - ACL *rule = new Acl::AndNode; - rule->parse(); - // empty rule OK + Acl::AndNode *rule = new Acl::AndNode; rule->context("(ssl_bump rule)", config_input_line); + rule->lineParse(); + // empty rule OK assert(ssl_bump); if (!*ssl_bump) {