From: Michael Buchau Date: Tue, 6 Dec 2016 23:42:35 +0000 (+1300) Subject: Bug 4406: SIGSEV in TunnelStateData::handleConnectResponse() during reconfigure and... X-Git-Tag: M-staged-PR71~351 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=71381f993fcc114691fffd5c9b25de7ebb6ad543;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 a823c622be..6f8931b2ef 100644 --- a/src/tunnel.cc +++ b/src/tunnel.cc @@ -513,7 +513,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 : nullptr); const bool relay = pwd && (strcmp(pwd, "PASS") == 0 || strcmp(pwd, "PASSTHRU") == 0) && (*status_ptr == Http::scProxyAuthenticationRequired || *status_ptr == Http::scUnauthorized);