diff --git a/src/net/spdy/spdy_proxy_client_socket.cc b/src/net/spdy/spdy_proxy_client_socket.cc index 33d35bfe00..1c21ca0586 100644 --- a/src/net/spdy/spdy_proxy_client_socket.cc +++ b/src/net/spdy/spdy_proxy_client_socket.cc @@ -554,6 +554,12 @@ int SpdyProxyClientSocket::DoReadReplyComplete(int result) { if (result < 0) return result; + // SpdyHeadersToHttpResponse() may have failed to convert the response + // headers (e.g. duplicate location values), in which case + // response_.headers is null and must not be dereferenced. + if (!response_.headers) + return ERR_TUNNEL_CONNECTION_FAILED; + // Require the "HTTP/1.x" status line for SSL CONNECT. if (response_.headers->GetHttpVersion() < HttpVersion(1, 0)) return ERR_TUNNEL_CONNECTION_FAILED;