]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 4164: SEGFAULT when %W formating code used in errorpages
authorChristos Tsantilas <chtsanti@users.sourceforge.net>
Tue, 16 Dec 2014 17:55:04 +0000 (19:55 +0200)
committerChristos Tsantilas <chtsanti@users.sourceforge.net>
Tue, 16 Dec 2014 17:55:04 +0000 (19:55 +0200)
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

index c8bf97810bccdc72c57bd0941df7cff40a27396b..9e0fe2334832748bf74c4199b79d5df2a30481d0 100644 (file)
@@ -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)