Blob Blame History Raw
------------------------------------------------------------
revno: 13237
revision-id: squid3@treenet.co.nz-20160506091244-3td2be9qbzsajxg8
parent: squid3@treenet.co.nz-20160502034253-axee4hqa4wuhlpkg
fixes bug: http://bugs.squid-cache.org/show_bug.cgi?id=4455
committer: Amos Jeffries <squid3@treenet.co.nz>
branch nick: 3.4
timestamp: Fri 2016-05-06 21:12:44 +1200
message:
  Bug 4455: SegFault from ESIInclude::Start
------------------------------------------------------------
# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: squid3@treenet.co.nz-20160506091244-3td2be9qbzsajxg8
# target_branch: http://bzr.squid-cache.org/bzr/squid3/3.4
# testament_sha1: b9714bc153e5fd6e8fe505a6c1d8a54c88e03a77
# timestamp: 2016-05-06 09:48:43 +0000
# source_branch: http://bzr.squid-cache.org/bzr/squid3/3.4
# base_revision_id: squid3@treenet.co.nz-20160502034253-\
#   axee4hqa4wuhlpkg
# 
# Begin patch
=== modified file 'src/client_side_request.cc'
--- src/client_side_request.cc	2014-04-09 16:53:05 +0000
+++ src/client_side_request.cc	2016-05-06 09:12:44 +0000
@@ -163,13 +163,15 @@
     start_time = current_time;
     setConn(aConn);
     al = new AccessLogEntry;
-    al->tcpClient = clientConnection = aConn->clientConnection;
+    if (aConn) {
+        al->tcpClient = clientConnection = aConn->clientConnection;
 #if USE_SSL
-    if (aConn->clientConnection != NULL && aConn->clientConnection->isOpen()) {
-        if (SSL *ssl = fd_table[aConn->clientConnection->fd].ssl)
-            al->cache.sslClientCert.reset(SSL_get_peer_certificate(ssl));
+        if (aConn->clientConnection != NULL && aConn->clientConnection->isOpen()) {
+            if (SSL *ssl = fd_table[aConn->clientConnection->fd].ssl)
+                al->cache.sslClientCert.reset(SSL_get_peer_certificate(ssl));
+        }
+#endif
     }
-#endif
     dlinkAdd(this, &active, &ClientActiveRequests);
 #if USE_ADAPTATION
     request_satisfaction_mode = false;