[master] 1636a31a3 vcc: Complain about the complete regexp pattern

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Mon Jan 31 16:08:06 UTC 2022


commit 1636a31a316d1634aef4977da419ab0bc500a80a
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Mon Jan 31 17:05:35 2022 +0100

    vcc: Complain about the complete regexp pattern

diff --git a/lib/libvcc/vcc_utils.c b/lib/libvcc/vcc_utils.c
index d6397636e..7feb88cf9 100644
--- a/lib/libvcc/vcc_utils.c
+++ b/lib/libvcc/vcc_utils.c
@@ -73,11 +73,13 @@ void
 vcc_regexp(struct vcc *tl, struct vsb *vgc_name)
 {
 	struct vsb *pattern;
+	struct token *t0;
 	char buf[BUFSIZ];
 	vre_t *t;
 	int error, erroroffset;
 	struct inifin *ifp;
 
+	t0 = tl->t;
 	pattern = VSB_new_auto();
 	AN(pattern);
 	vcc_cstrcat(tl, pattern);
@@ -88,7 +90,7 @@ vcc_regexp(struct vcc *tl, struct vsb *vgc_name)
 		VSB_cat(tl->sb, "Regexp compilation error:\n\n");
 		AZ(VRE_error(tl->sb, error));
 		VSB_cat(tl->sb, "\n\n");
-		vcc_ErrWhere(tl, tl->t);
+		vcc_ErrWhere2(tl, t0, tl->t);
 		VSB_destroy(&pattern);
 		return;
 	}


More information about the varnish-commit mailing list