From: phk Date: Thu, 31 Jul 2008 09:23:28 +0000 (+0000) Subject: Check that we found a variable before using it. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=57999dfc03f3bae7c39173d6d915bec15bd69d1c;p=varnish Check that we found a variable before using it. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3035 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/lib/libvcl/vcc_action.c b/varnish-cache/lib/libvcl/vcc_action.c index a32ee42f..e1279e9d 100644 --- a/varnish-cache/lib/libvcl/vcc_action.c +++ b/varnish-cache/lib/libvcl/vcc_action.c @@ -99,6 +99,7 @@ parse_error(struct tokenlist *tl) vcc_NextToken(tl); if (tl->t->tok == VAR) { vp = vcc_FindVar(tl, tl->t, vcc_vars); + ERRCHK(tl); if (vp->fmt == INT) { Fb(tl, 1, "VRT_error(sp, %s", vp->rname); vcc_NextToken(tl);