]> 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:16:25 +0000 (02:16 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Sat, 30 Nov 2013 09:16:25 +0000 (02:16 -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 d43f89f58c3841f34f19839cdbc5b9eeb1e3bd18..28583763d72eaf407ec04bf72e662b080b02bbe0 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);