File r14121.patch of Package squid.11863
------------------------------------------------------------
revno: 14121
fixes bug: http://bugs.squid-cache.org/show_bug.cgi?id=4406
author: Michael Buchau <mike@m-buchau.de>
committer: Amos Jeffries <squid3@treenet.co.nz>
branch nick: 3.5
timestamp: Fri 2016-12-09 17:33:04 +1300
message:
Bug 4406: SIGSEV in TunnelStateData::handleConnectResponse() during reconfigure and restart
diff:
=== modified file 'src/tunnel.cc'
--- src/tunnel.cc 2016-08-17 13:34:13 +0000
+++ src/tunnel.cc 2016-12-09 04:33:04 +0000
@@ -475,7 +475,8 @@
*status_ptr = rep.sline.status();
// we need to relay the 401/407 responses when login=PASS(THRU)
- const char *pwd = server.conn->getPeer()->login;
+ const CachePeer *peer = server.conn->getPeer();
+ const char *pwd = (peer ? peer->login : NULL);
const bool relay = pwd && (strcmp(pwd, "PASS") == 0 || strcmp(pwd, "PASSTHRU") == 0) &&
(*status_ptr == Http::scProxyAuthenticationRequired ||
*status_ptr == Http::scUnauthorized);