From: Christos Tsantilas Date: Mon, 9 Jan 2012 14:31:50 +0000 (+0200) Subject: Bug 3471: Segfault when %la formating code used X-Git-Tag: BumpSslServerFirst.take05~12^2~87 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=47176c0b623f8aab8061c38082f69b01fef600ff;p=thirdparty%2Fsquid.git Bug 3471: Segfault when %la formating code used --- diff --git a/src/format/Format.cc b/src/format/Format.cc index 6344c4cfe2..d5a281beb6 100644 --- a/src/format/Format.cc +++ b/src/format/Format.cc @@ -371,8 +371,10 @@ Format::Format::assemble(MemBuf &mb, AccessLogEntry *al, int logSequenceNumber) case LFT_LOCAL_LISTENING_IP: { // avoid logging a dash if we have reliable info - const bool interceptedAtKnownPort = (al->request->flags.spoof_client_ip || - al->request->flags.intercepted) && al->cache.port; + const bool interceptedAtKnownPort = al->request ? + (al->request->flags.spoof_client_ip || + al->request->flags.intercepted) && al->cache.port : + false; if (interceptedAtKnownPort) { const bool portAddressConfigured = !al->cache.port->s.IsAnyAddr(); if (portAddressConfigured)