[6.0] 2bed7b05d Ignore index lines without either a '+' or '-'

Martin Blix Grydeland martin at varnish-software.com
Fri Oct 18 13:23:08 UTC 2019


commit 2bed7b05d36299ec0d929faebf4010d2a1ea6f0b
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 3fca11fb8..3f26ca516 100644
--- a/lib/libvarnishapi/vsm.c
+++ b/lib/libvarnishapi/vsm.c
@@ -579,7 +579,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