From: hno <> Date: Sat, 29 Jul 2006 19:46:05 +0000 (+0000) Subject: Bug #1702: Squid silently accepts defining acl's with too long name, even X-Git-Tag: SQUID_3_0_PRE5~208 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=401f503aff9f42642d8ac756096dbccd88f48f03;p=thirdparty%2Fsquid.git Bug #1702: Squid silently accepts defining acl's with too long name, even if these then can not be used in http_access or other directives. --- diff --git a/src/acl.cc b/src/acl.cc index 7faffc2f44..3391156784 100644 --- a/src/acl.cc +++ b/src/acl.cc @@ -1,5 +1,5 @@ /* - * $Id: acl.cc,v 1.320 2006/05/16 05:49:44 hno Exp $ + * $Id: acl.cc,v 1.321 2006/07/29 13:46:05 hno Exp $ * * DEBUG: section 28 Access Control * AUTHOR: Duane Wessels @@ -103,6 +103,12 @@ ACL::ParseAclLine(ConfigParser &parser, ACL ** head) return; } + if (strlen(t) >= ACL_NAME_SZ) { + debug(28, 0) ("aclParseAclLine: aclParseAclLine: ACL name '%s' too long, max %d characters supported\n", t, ACL_NAME_SZ - 1); + parser.destruct(); + return; + } + xstrncpy(aclname, t, ACL_NAME_SZ); /* snarf the ACL type */ char *theType;