]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Regression: segfault logging with %tg format specifier
authorSteve Hill <steve@opendium.com>
Wed, 14 May 2014 15:36:48 +0000 (09:36 -0600)
committerAmos Jeffries <squid3@treenet.co.nz>
Wed, 14 May 2014 15:36:48 +0000 (09:36 -0600)
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.

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

index 10d1f67625fba97bdd33b038bb5c33209ac12794..10782850f28dd954b702946889df4d75b5698ade 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