From 98340a7b8aeafac88486185909cb35d8e12830f8 Mon Sep 17 00:00:00 2001 From: Christos Tsantilas Date: Tue, 16 Dec 2014 19:55:04 +0200 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 c8bf97810b..9e0fe23348 100644 --- a/src/errorpage.cc +++ b/src/errorpage.cc @@ -716,7 +716,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