]> 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:13:21 +0000 (21:13 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Fri, 6 May 2016 09:13:21 +0000 (21:13 +1200)
src/client_side_request.cc

index bfdd7e01ca425f9baa79d44278f54e2507a4f4cf..6db0cdf157a5e654d372d39abd380f52e89f3e83 100644 (file)
@@ -189,13 +189,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;