From 3239f66f6f87d3f756b41cdcd9ea44c90f620610 Mon Sep 17 00:00:00 2001 From: Nathan Hoad Date: Sat, 30 Nov 2013 02:16:25 -0700 Subject: [PATCH] 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. --- src/acl/Gadgets.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/acl/Gadgets.cc b/src/acl/Gadgets.cc index d43f89f58c..28583763d7 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); -- 2.47.2