]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 4455: SegFault from ESIInclude::Start
authorAmos Jeffries <squid3@treenet.co.nz>
Fri, 6 May 2016 09:12:44 +0000 (21:12 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Fri, 6 May 2016 09:12:44 +0000 (21:12 +1200)
src/client_side_request.cc

index 232130b835e4c96dfedef6091901bd21fe3a737b..23b90d6f70e5598f54c5108554599a14269c57c3 100644 (file)
@@ -163,13 +163,15 @@ ClientHttpRequest::ClientHttpRequest(ConnStateData * aConn) :
     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
+    }
     dlinkAdd(this, &active, &ClientActiveRequests);
 #if USE_ADAPTATION
     request_satisfaction_mode = false;