From: hno <> Date: Mon, 22 Oct 2001 07:22:45 +0000 (+0000) Subject: Protect acl types requiring a request from NULL pointer dereference X-Git-Tag: SQUID_3_0_PRE1~1334 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=098177953d70618128e6ee24b4b2f4b317c216a4;p=thirdparty%2Fsquid.git Protect acl types requiring a request from NULL pointer dereference if used in contexts where there is no request (snmp_access for example) --- diff --git a/src/acl.cc b/src/acl.cc index 9abf15dc74..6038b05701 100644 --- a/src/acl.cc +++ b/src/acl.cc @@ -1,6 +1,6 @@ /* - * $Id: acl.cc,v 1.264 2001/10/17 19:43:39 hno Exp $ + * $Id: acl.cc,v 1.265 2001/10/22 01:22:45 hno Exp $ * * DEBUG: section 28 Access Control * AUTHOR: Duane Wessels @@ -1423,14 +1423,21 @@ aclMatchAcl(acl * ae, aclCheck_t * checklist) if (!ae) return 0; switch (ae->type) { - case ACL_DST_IP: + case ACL_BROWSER: + case ACL_DST_ASN: case ACL_DST_DOMAIN: case ACL_DST_DOM_REGEX: + case ACL_DST_IP: + case ACL_MAX_USER_IP: + case ACL_METHOD: + case ACL_PROTO: + case ACL_PROXY_AUTH: + case ACL_PROXY_AUTH_REGEX: + case ACL_REP_MIME_TYPE: + case ACL_REQ_MIME_TYPE: case ACL_URLPATH_REGEX: case ACL_URL_PORT: - case ACL_PROTO: - case ACL_METHOD: - case ACL_DST_ASN: + case ACL_URL_REGEX: /* These ACL types require checklist->request */ if (NULL == r) { debug(28, 1) ("WARNING: '%s' ACL is used but there is no"