]> 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>
Fri, 29 Nov 2013 23:26:03 +0000 (16:26 -0700)
committerAlex Rousskov <rousskov@measurement-factory.com>
Fri, 29 Nov 2013 23:26:03 +0000 (16:26 -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 62c1d18bef54bae4f3ef464f4b1513b2f63a048d..884f7a088639708e83c7cdd31d6d1e7fd2ef47f3 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);