From: Nathan Hoad Date: Fri, 29 Nov 2013 23:26:03 +0000 (-0700) Subject: Bug 3972: Segfault when getting the deny info page ID after a reconfigure X-Git-Tag: SQUID_3_5_0_1~489 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=37ea6ef57d07adcb02461bf05de206b350d6605d;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 62c1d18bef..884f7a0886 100644 --- a/src/acl/Gadgets.cc +++ b/src/acl/Gadgets.cc @@ -54,6 +54,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);