[master] e9436f63b Ignore index lines without either a '+' or '-'

Martin Blix Grydeland martin at varnish-software.com
Mon Sep 9 08:23:06 UTC 2019


commit e9436f63be963a6d4942c4070504e0e8419c15cb
Author: Martin Blix Grydeland <martin at varnish-software.com>
Date:   Thu Aug 29 17:43:12 2019 +0200

    Ignore index lines without either a '+' or '-'
    
    When upgrading from when a previous release that doesn't have the latest
    VSM index file changes, the utilities will assert when trying to parse the
    index file from the previous version. Fix that by ignoring lines not
    starting with either '#', '+' or '-'.

diff --git a/lib/libvarnishapi/vsm.c b/lib/libvarnishapi/vsm.c
index 53ceb387b..ba9ed716d 100644
--- a/lib/libvarnishapi/vsm.c
+++ b/lib/libvarnishapi/vsm.c
@@ -569,7 +569,7 @@ vsm_vlu_func(void *priv, const char *line)
 {
 	struct vsm *vd;
 	struct vsm_set *vs;
-	int i = -1;
+	int i = 0;
 
 	CAST_OBJ_NOTNULL(vs, priv, VSM_SET_MAGIC);
 	vd = vs->vsm;


More information about the varnish-commit mailing list