Mailing List Archive

r1971 - trunk/varnish-cache/bin/varnishd
Author: phk
Date: 2007-09-21 00:25:27 +0200 (Fri, 21 Sep 2007)
New Revision: 1971

Modified:
trunk/varnish-cache/bin/varnishd/cache_vrt.c
Log:
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.


Modified: trunk/varnish-cache/bin/varnishd/cache_vrt.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_vrt.c 2007-09-20 10:44:18 UTC (rev 1970)
+++ trunk/varnish-cache/bin/varnishd/cache_vrt.c 2007-09-20 22:25:27 UTC (rev 1971)
@@ -508,6 +508,8 @@
int
VRT_strcmp(const char *s1, const char *s2)
{
+ if (s1 == NULL || s2 == NULL)
+ return(1);
return (strcmp(s1, s2));
}