[prev in list] [next in list] [prev in thread] [next in thread]
List: varnish-commit
Subject: [3.0] b54bfa5 Missing errorchecks incompilation of regsub()
From: Tollef Fog Heen <tfheen () varnish-cache ! org>
Date: 2012-05-24 12:51:11
Message-ID: E1SXXVX-0004kp-7W () project ! varnish-software ! com
[Download RAW message or body]
commit b54bfa5c2d038cd2ea92a37916821644d56af81b
Author: Poul-Henning Kamp <phk@FreeBSD.org>
Date: Mon Apr 16 07:12:10 2012 +0000
Missing errorchecks incompilation of regsub()
Fixes #1125
diff --git a/lib/libvcl/vcc_expr.c b/lib/libvcl/vcc_expr.c
index 0c885c0..2ec7dc0 100644
--- a/lib/libvcl/vcc_expr.c
+++ b/lib/libvcl/vcc_expr.c
@@ -454,6 +454,8 @@ vcc_Eval_Regsub(struct vcc *tl, struct expr **e, const struct symbol *sym)
SkipToken(tl, '(');
vcc_expr0(tl, &e2, STRING);
+ if (e2 == NULL)
+ return;
if (e2->fmt != STRING)
vcc_expr_tostring(&e2, STRING);
@@ -467,6 +469,8 @@ vcc_Eval_Regsub(struct vcc *tl, struct expr **e, const struct symbol *sym)
SkipToken(tl, ',');
vcc_expr0(tl, &e2, STRING);
+ if (e2 == NULL)
+ return;
if (e2->fmt != STRING)
vcc_expr_tostring(&e2, STRING);
*e = vcc_expr_edit(STRING, "\v1, \v2)", *e, e2);
_______________________________________________
varnish-commit mailing list
varnish-commit@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic