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: M-staged-PR304~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c56abcbe00a1f4ca39ce79c2b05c508f1fbbc6ae;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 ec9b3db08f..663cba123a 100644 --- a/src/format/Format.cc +++ b/src/format/Format.cc @@ -1199,7 +1199,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; @@ -1209,7 +1209,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;