[4.1] 874294d Only update timestamp if we got a timestamp
PÃ¥l Hermunn Johansen
hermunn at varnish-software.com
Fri Sep 9 13:01:04 CEST 2016
commit 874294d9414886eaeb795c549e0065966f41ac12
Author: Martin Blix Grydeland <martin at varnish-software.com>
Date: Mon Aug 8 14:39:30 2016 +0200
Only update timestamp if we got a timestamp
If a log transaction is parsed that don't contain timestamps
(e.g. they are filtered in varnishd), then this would cause a NULL
pointer dereference.
diff --git a/bin/varnishhist/varnishhist.c b/bin/varnishhist/varnishhist.c
index ea72614..f887c7a 100644
--- a/bin/varnishhist/varnishhist.c
+++ b/bin/varnishhist/varnishhist.c
@@ -306,7 +306,8 @@ accumulate(struct VSL_data *vsl, struct VSL_transaction * const pt[],
* only parse the last tsp seen in this transaction -
* it should be the latest.
*/
- upd_vsl_ts(tsp);
+ if (tsp)
+ upd_vsl_ts(tsp);
/* phase out old data */
if (nhist == HIST_N) {
More information about the varnish-commit
mailing list