[master] eeee484 Avoid assertion failure in VCC if the first symbol encountered in VCL is not an ID
Nils Goroll
nils.goroll at uplex.de
Mon Oct 27 21:03:00 CET 2014
commit eeee484d56b3c92348e1b1b8ff6db424938b9bec
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Mon Oct 27 21:01:55 2014 +0100
Avoid assertion failure in VCC if the first symbol encountered in VCL is not an ID
Trivial test VCL:
C{ }C; vcl 4.0;
diff --git a/lib/libvcc/vcc_parse.c b/lib/libvcc/vcc_parse.c
index 9412a58..e235090 100644
--- a/lib/libvcc/vcc_parse.c
+++ b/lib/libvcc/vcc_parse.c
@@ -338,7 +338,7 @@ vcc_Parse(struct vcc *tl)
{
struct toplev *tp;
- if (!vcc_IdIs(tl->t, "vcl")) {
+ if (tl->t->tok != ID || !vcc_IdIs(tl->t, "vcl")) {
VSB_printf(tl->sb,
"VCL version declaration missing\n"
"Update your VCL to Version 4 syntax, and add\n"
More information about the varnish-commit
mailing list