From: Steve Hill Date: Wed, 14 May 2014 15:36:48 +0000 (-0600) Subject: Regression: segfault logging with %tg format specifier X-Git-Tag: SQUID_3_4_6~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=22f887d86ed9d83dc7f2b1017259431ead1e1f6c;p=thirdparty%2Fsquid.git Regression: segfault logging with %tg format specifier In rev.13132 Token class data member was converted from union to struct without adding initializer for the timespec field. timespec is a redundant field anyway, just remove it. --- diff --git a/src/format/Format.cc b/src/format/Format.cc index 10d1f67625..10782850f2 100644 --- a/src/format/Format.cc +++ b/src/format/Format.cc @@ -475,7 +475,7 @@ Format::Format::assemble(MemBuf &mb, const AccessLogEntry::Pointer &al, int logS const char *spec; struct tm *t; - spec = fmt->data.timespec; + spec = fmt->data.string; if (fmt->type == LFT_TIME_LOCALTIME) { if (!spec) diff --git a/src/format/Token.h b/src/format/Token.h index a50c38a722..16e21787b5 100644 --- a/src/format/Token.h +++ b/src/format/Token.h @@ -49,7 +49,6 @@ public: char *element; char separator; } header; - char *timespec; } data; int widthMin; ///< minimum field width int widthMax; ///< maximum field width