]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Regression: segfault logging with %tg format specifier
authorSteve Hill <steve@opendium.com>
Tue, 13 May 2014 10:27:18 +0000 (03:27 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Tue, 13 May 2014 10:27:18 +0000 (03:27 -0700)
In trunk rev.13387 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.

src/format/Format.cc
src/format/Token.h

index ce4f41b029a837da59e921805ab3fc89694ebd85..7f61bc0b4aab05b116f74e8ed2d173ad423e06c1 100644 (file)
@@ -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)
index a50c38a722e10e3eb17aeff52924d80fca7d72e6..16e21787b5bcdeec852cd818ee3fbbc9352237b2 100644 (file)
@@ -49,7 +49,6 @@ public:
             char *element;
             char separator;
         } header;
-        char *timespec;
     } data;
     int widthMin; ///< minimum field width
     int widthMax; ///< maximum field width