commit df9bc1860ff4d4c659aca71ec9ebcd4bdd0d31f1
Author: Poul-Henning Kamp <phk@FreeBSD.org>
Date: Wed Nov 30 08:47:25 2022 +0000
Make WS_Allocated() assert that pointers are not in the free part of WS
diff --git a/bin/varnishd/cache/cache_ws.c b/bin/varnishd/cache/cache_ws.c
index d327ad757..d6ff67370 100644
--- a/bin/varnishd/cache/cache_ws.c
+++ b/bin/varnishd/cache/cache_ws.c
@@ -71,6 +71,7 @@ WS_Allocated(const struct ws *ws, const void *ptr, ssize_t len)
WS_Assert(ws);
if (len < 0)
len = strlen(p) + 1;
+ assert(!(p > ws->f && p <= ws->e));
return (p >= ws->s && (p + len) <= ws->f);
}
_______________________________________________
varnish-commit mailing list
varnish-commit@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit
Author: Poul-Henning Kamp <phk@FreeBSD.org>
Date: Wed Nov 30 08:47:25 2022 +0000
Make WS_Allocated() assert that pointers are not in the free part of WS
diff --git a/bin/varnishd/cache/cache_ws.c b/bin/varnishd/cache/cache_ws.c
index d327ad757..d6ff67370 100644
--- a/bin/varnishd/cache/cache_ws.c
+++ b/bin/varnishd/cache/cache_ws.c
@@ -71,6 +71,7 @@ WS_Allocated(const struct ws *ws, const void *ptr, ssize_t len)
WS_Assert(ws);
if (len < 0)
len = strlen(p) + 1;
+ assert(!(p > ws->f && p <= ws->e));
return (p >= ws->s && (p + len) <= ws->f);
}
_______________________________________________
varnish-commit mailing list
varnish-commit@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit