From ef59be2e7d78dd6118c5450413b45457d549d8d7 Mon Sep 17 00:00:00 2001 From: Christos Tsantilas Date: Thu, 18 Dec 2014 06:40:46 -0800 Subject: [PATCH] Bug 4164: SEGFAULT when %W formating code used in errorpages Squid will crash inside ErrorState::Dump if not authentication configured for squid. In this case ErrorState::auth_user_request is NULL and trying to access a method of this object will cause segfault to squid. --- src/errorpage.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/errorpage.cc b/src/errorpage.cc index 6a01da7d91..8c6270aac9 100644 --- a/src/errorpage.cc +++ b/src/errorpage.cc @@ -736,7 +736,7 @@ ErrorState::Dump(MemBuf * mb) str.Printf("Err: [none]\r\n"); } #if USE_AUTH - if (auth_user_request->denyMessage()) + if (auth_user_request.getRaw() && auth_user_request->denyMessage()) str.Printf("Auth ErrMsg: %s\r\n", auth_user_request->denyMessage()); #endif if (dnsError.size() > 0) -- 2.47.2