From: Nathan Hoad Date: Sat, 30 Nov 2013 09:17:07 +0000 (-0700) Subject: Bug 3972: Segfault when getting the deny info page ID after a reconfigure X-Git-Tag: SQUID_3_3_11~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3211a3b3c8296a4ae7ad21fc4b3bd5bdb7ce7eb5;p=thirdparty%2Fsquid.git Bug 3972: Segfault when getting the deny info page ID after a reconfigure 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. --- diff --git a/src/acl/Gadgets.cc b/src/acl/Gadgets.cc index f6fd6ba3cb..1f4c864fbd 100644 --- a/src/acl/Gadgets.cc +++ b/src/acl/Gadgets.cc @@ -53,6 +53,11 @@ 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);