[4.1] 68f15e0 Fix an off-by-one error in WS_Assert_Allocated().

PÃ¥l Hermunn Johansen hermunn at varnish-software.com
Thu Jun 15 14:08:11 CEST 2017


commit 68f15e0e402958fcb7e509103912db33317ee7af
Author: Geoff Simmons <geoff at uplex.de>
Date:   Tue May 16 14:22:14 2017 +0200

    Fix an off-by-one error in WS_Assert_Allocated().

diff --git a/bin/varnishd/cache/cache_ws.c b/bin/varnishd/cache/cache_ws.c
index 3c44599..b0b3712 100644
--- a/bin/varnishd/cache/cache_ws.c
+++ b/bin/varnishd/cache/cache_ws.c
@@ -67,7 +67,7 @@ WS_Assert_Allocated(const struct ws *ws, const void *ptr, ssize_t len)
 	WS_Assert(ws);
 	if (len < 0)
 		len = strlen(p) + 1;
-	assert(p >= ws->s && (p + len) < ws->f);
+	assert(p >= ws->s && (p + len) <= ws->f);
 }
 
 /*



More information about the varnish-commit mailing list