[master] a339f63 Fix an off-by-one error in WS_Assert_Allocated().

Geoff Simmons geoff at uplex.de
Tue May 16 14:23:06 CEST 2017


commit a339f63b02b5373baea43f72e8acd577cd31627d
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 13ad4f0..270aa16 100644
--- a/bin/varnishd/cache/cache_ws.c
+++ b/bin/varnishd/cache/cache_ws.c
@@ -81,7 +81,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