r5458 - trunk/varnish-cache/lib/libvcl

phk at varnish-cache.org phk at varnish-cache.org
Fri Oct 22 20:53:02 CEST 2010


Author: phk
Date: 2010-10-22 20:53:02 +0200 (Fri, 22 Oct 2010)
New Revision: 5458

Modified:
   trunk/varnish-cache/lib/libvcl/vcc_expr.c
Log:
Don't assert the format until we have done the error check.

The ticket (#799) probably triggers this by using std.random()
without a "import std" statement.

Fixes: #799



Modified: trunk/varnish-cache/lib/libvcl/vcc_expr.c
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcc_expr.c	2010-10-22 10:29:17 UTC (rev 5457)
+++ trunk/varnish-cache/lib/libvcl/vcc_expr.c	2010-10-22 18:53:02 UTC (rev 5458)
@@ -663,8 +663,8 @@
 		tk = tl->t;
 		vcc_NextToken(tl);
 		vcc_expr4(tl, &e2, f2);
+		ERRCHK(tl);
 		assert(e2->fmt == f2);
-		ERRCHK(tl);
 		if (tk->tok == '*')
 			*e = vcc_expr_edit(f3, "(\v1*\v2)", *e, e2);
 		else




More information about the varnish-commit mailing list