]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bugzilla #215: NULL pointer access for proxy requests in accel-only mode
authorwessels <>
Tue, 21 Aug 2001 11:54:13 +0000 (11:54 +0000)
committerwessels <>
Tue, 21 Aug 2001 11:54:13 +0000 (11:54 +0000)
This patch fixes the bug by checking for NULL in aclIsProxyAuth().
If access is denied due to receipt of a proxy request with
'httpd_accel_with_proxy off' then AclMatchedName is NULL.
clientAccessCheckDone() calls aclIsProxyAuth() with the NULL pointer,
so the check could go into either function.  It was cleaner to put
it in aclIsProxyAuth().

src/acl.cc

index fdcc53e3e941c63061d790e7834e2c7f0b1f2620..887c87af3163c3df33f8ee7af16c2ff6f7c4c892 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: acl.cc,v 1.257 2001/08/03 16:54:51 wessels Exp $
+ * $Id: acl.cc,v 1.258 2001/08/21 05:54:13 wessels Exp $
  *
  * DEBUG: section 28    Access Control
  * AUTHOR: Duane Wessels
@@ -901,8 +901,10 @@ aclGetDenyInfoPage(acl_deny_info_list ** head, const char *name)
 int
 aclIsProxyAuth(const char *name)
 {
-    acl *a = aclFindByName(name);
-    if (a)
+    acl *a;
+    if (NULL == name)
+       return 0;
+    if ((a = aclFindByName(name)))
        return a->type == ACL_PROXY_AUTH;
     return 0;
 }