Since 2011 commit
38e16f9, Log::LogConfig::dumpFormats() dereferenced a
nil `logformats` pointer while reporting a non-existent logformat
configuration (e.g., squid.conf.default): `logformats->dump(e, name)`.
In most environments, that code "worked" because the corresponding
Format::Format::dump() method happens to do nothing if "this" is nil.
However, in some environments, Squid segfaulted.
void parseFormats();
void dumpFormats(StoreEntry *e, const char *name) {
- logformats->dump(e, name);
+ if (logformats)
+ logformats->dump(e, name);
}
/// File path to logging daemon executable