------------------------------------------------------------ revno: 13692 revision-id: squid3@treenet.co.nz-20141218125702-dmzpopynf9mk570o parent: squid3@treenet.co.nz-20141218125455-q0sus7gm3654vtjq fixes bug: http://bugs.squid-cache.org/show_bug.cgi?id=4164 author: Christos Tsantilas committer: Amos Jeffries branch nick: 3.5 timestamp: Thu 2014-12-18 04:57:02 -0800 message: 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. ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20141218125702-dmzpopynf9mk570o # target_branch: http://bzr.squid-cache.org/bzr/squid3/3.5 # testament_sha1: fe93d660926780b33e1036b39fac9356469ba4e9 # timestamp: 2014-12-18 13:50:58 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/3.5 # base_revision_id: squid3@treenet.co.nz-20141218125455-\ # q0sus7gm3654vtjq # # Begin patch === modified file 'src/errorpage.cc' --- src/errorpage.cc 2014-09-13 13:59:43 +0000 +++ src/errorpage.cc 2014-12-18 12:57:02 +0000 @@ -716,7 +716,7 @@ 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)