From: Michael Buchau Date: Fri, 9 Dec 2016 04:33:04 +0000 (+1300) Subject: Bug 4406: SIGSEV in TunnelStateData::handleConnectResponse() during reconfigure and... X-Git-Tag: SQUID_3_5_23~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ec8b1b6c956c54b8eaa2eba12f358f3a17216298;p=thirdparty%2Fsquid.git Bug 4406: SIGSEV in TunnelStateData::handleConnectResponse() during reconfigure and restart --- diff --git a/src/tunnel.cc b/src/tunnel.cc index 73d64115af..2cb9a7e1d3 100644 --- a/src/tunnel.cc +++ b/src/tunnel.cc @@ -475,7 +475,8 @@ TunnelStateData::handleConnectResponse(const size_t chunkSize) *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);