]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 3972: Segfault when getting the deny info page ID after a reconfigure
authorNathan Hoad <nathan@getoffmalawn.com>
Sat, 30 Nov 2013 09:17:07 +0000 (02:17 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Sat, 30 Nov 2013 09:17:07 +0000 (02:17 -0700)
Older ACL code was using a stale AclMatchedName value. More recent code resets
the AclMatchedName global to NULL to avoid leaking the stale value, but that
may crash strcmp() in aclGetDenyInfoPage(). Long-term, the global should be
removed, of course.

src/acl/Gadgets.cc

index f6fd6ba3cb547b5c3e559dd12d2409c612debc50..1f4c864fbdfae4a286c618c7494f4c0e759cf3c2 100644 (file)
 err_type
 aclGetDenyInfoPage(AclDenyInfoList ** head, const char *name, int redirect_allowed)
 {
+    if (!name) {
+        debugs(28, 3, "ERR_NONE due to a NULL name");
+        return ERR_NONE;
+    }
+
     AclDenyInfoList *A = NULL;
 
     debugs(28, 8, HERE << "got called for " << name);