From: Christos Tsantilas Date: Thu, 18 Dec 2014 14:40:46 +0000 (-0800) Subject: Bug 4164: SEGFAULT when %W formating code used in errorpages X-Git-Tag: SQUID_3_4_11~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ef59be2e7d78dd6118c5450413b45457d549d8d7;p=thirdparty%2Fsquid.git 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. --- 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)