From cd04d05c74f7a98f3dec297180add35f51c09714 Mon Sep 17 00:00:00 2001 From: phk Date: Fri, 11 Aug 2006 14:21:55 +0000 Subject: [PATCH] A NULL pointer does not match a regexp git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@814 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/bin/varnishd/cache_vrt_re.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/varnish-cache/bin/varnishd/cache_vrt_re.c b/varnish-cache/bin/varnishd/cache_vrt_re.c index c50460e7..1a2c5ea2 100644 --- a/varnish-cache/bin/varnishd/cache_vrt_re.c +++ b/varnish-cache/bin/varnishd/cache_vrt_re.c @@ -43,6 +43,8 @@ VRT_re_match(const char *s, void *re) regex_t *t; int i; + if (s == NULL) + return (0); t = re; i = regexec(t, s, 0, NULL, 0); if (i == 0) -- 2.39.5