[master] 4dac230 Don't explode if ErrWhere2() comes with a NULL-pointer, fall back to ErrWhere()
Poul-Henning Kamp
phk at varnish-cache.org
Mon Mar 14 10:21:26 CET 2011
commit 4dac2303f87627ae5c37cb85723acef3998c5543
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Mon Mar 14 08:56:59 2011 +0000
Don't explode if ErrWhere2() comes with a NULL-pointer, fall back to
ErrWhere()
diff --git a/lib/libvcl/vcc_token.c b/lib/libvcl/vcc_token.c
index 28f5cdc..6818777 100644
--- a/lib/libvcl/vcc_token.c
+++ b/lib/libvcl/vcc_token.c
@@ -197,6 +197,10 @@ vcc_ErrWhere2(struct vcc *tl, const struct token *t, const struct token *t2)
{
const char *l1, *l2, *l3;
+ if (t == NULL) {
+ vcc_ErrWhere(tl, t2);
+ return;
+ }
vcc_iline(t, &l1, 0);
t2 = VTAILQ_PREV(t2, tokenhead, list);
vcc_iline(t2, &l2, 1);
More information about the varnish-commit
mailing list