From b17efe06da8c323ee5f1e4ac0da753371b762325 Mon Sep 17 00:00:00 2001 From: phk Date: Thu, 20 Sep 2007 22:25:27 +0000 Subject: [PATCH] Don't core dump if VCL tries to compare NULL pointers, just let the comparison fail. This typically happens if a paticular header is not present. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1971 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/bin/varnishd/cache_vrt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/varnish-cache/bin/varnishd/cache_vrt.c b/varnish-cache/bin/varnishd/cache_vrt.c index d0429587..11f16269 100644 --- a/varnish-cache/bin/varnishd/cache_vrt.c +++ b/varnish-cache/bin/varnishd/cache_vrt.c @@ -508,6 +508,8 @@ VRT_purge(const char *regexp, int hash) int VRT_strcmp(const char *s1, const char *s2) { + if (s1 == NULL || s2 == NULL) + return(1); return (strcmp(s1, s2)); } -- 2.39.5