From ec8b1b6c956c54b8eaa2eba12f358f3a17216298 Mon Sep 17 00:00:00 2001 From: Michael Buchau Date: Fri, 9 Dec 2016 17:33:04 +1300 Subject: [PATCH] Bug 4406: SIGSEV in TunnelStateData::handleConnectResponse() during reconfigure and restart --- src/tunnel.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- 2.47.2