]> err.no Git - varnish/commitdiff
Don't core dump if VCL tries to compare NULL pointers, just let the
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Thu, 20 Sep 2007 22:25:27 +0000 (22:25 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Thu, 20 Sep 2007 22:25:27 +0000 (22:25 +0000)
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

index d04295877341b77acab9758235646eebfdd30cc4..11f162696240551f95dd7548e25cdd4d6c96a64c 100644 (file)
@@ -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));
 }