[master] 6a9d2f2 Emit a regular error, rather than a VCC assert.

Poul-Henning Kamp phk at varnish-cache.org
Wed Oct 17 12:04:36 CEST 2012


commit 6a9d2f2fa1140e8e41a45f44c6c2a4ee6c1afcfe
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Wed Oct 17 10:03:54 2012 +0000

    Emit a regular error, rather than a VCC assert.
    
    Found & Fixed by:	Federico G. Schwindt
    Fixes #1212

diff --git a/lib/libvcl/vcc_expr.c b/lib/libvcl/vcc_expr.c
index 06f93ec..1b6bf12 100644
--- a/lib/libvcl/vcc_expr.c
+++ b/lib/libvcl/vcc_expr.c
@@ -529,6 +529,7 @@ void
 vcc_Eval_Func(struct vcc *tl, struct expr **e, const struct symbol *sym)
 {
 	const char *p, *r;
+	const struct var *v;
 	struct expr *e1, *e2;
 	enum var_type fmt;
 	char buf[32];
@@ -581,7 +582,7 @@ vcc_Eval_Func(struct vcc *tl, struct expr **e, const struct symbol *sym)
 			if (*p != '\0')
 				SkipToken(tl, ',');
 		} else if (fmt == HEADER) {
-			const struct var *v;
+			ExpectErr(tl, ID);
 			sym = VCC_FindSymbol(tl, tl->t, SYM_NONE);
 			ERRCHK(tl);
 			SkipToken(tl, ID);



More information about the varnish-commit mailing list