From: chi-mf <43963496+chi-mf@users.noreply.github.com> Date: Wed, 10 Oct 2018 07:50:52 +0000 (+0000) Subject: Fixed %USER_CA_CERT_xx and %USER_CERT_xx crashes (#301) X-Git-Tag: SQUID_4_4~6 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=c1a087b8a39013e0c3a56db6fe50da4a798954e2;p=thirdparty%2Fsquid.git Fixed %USER_CA_CERT_xx and %USER_CERT_xx crashes (#301) The bug was introduced in 4e56d7f6 when the formatting code was moved into Format::Format::assemble() where the old "format" loop variable is a Format data member with the right type but (usually) the wrong value. --- diff --git a/src/format/Format.cc b/src/format/Format.cc index da6d25f475..c1e19b4788 100644 --- a/src/format/Format.cc +++ b/src/format/Format.cc @@ -1193,7 +1193,7 @@ Format::Format::assemble(MemBuf &mb, const AccessLogEntry::Pointer &al, int logS ConnStateData *conn = al->request->clientConnectionManager.get(); if (conn && Comm::IsConnOpen(conn->clientConnection)) { if (auto ssl = fd_table[conn->clientConnection->fd].ssl.get()) - out = sslGetUserAttribute(ssl, format->data.header.header); + out = sslGetUserAttribute(ssl, fmt->data.header.header); } } break; @@ -1203,7 +1203,7 @@ Format::Format::assemble(MemBuf &mb, const AccessLogEntry::Pointer &al, int logS ConnStateData *conn = al->request->clientConnectionManager.get(); if (conn && Comm::IsConnOpen(conn->clientConnection)) { if (auto ssl = fd_table[conn->clientConnection->fd].ssl.get()) - out = sslGetCAAttribute(ssl, format->data.header.header); + out = sslGetCAAttribute(ssl, fmt->data.header.header); } } break;