[master] 6a989bc Don't expect the workspace length to be aligned.

Poul-Henning Kamp phk at FreeBSD.org
Mon Sep 1 10:49:32 CEST 2014


commit 6a989bc91aee29a653ab212c95afa9665abe5d3b
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Sep 1 08:48:47 2014 +0000

    Don't expect the workspace length to be aligned.

diff --git a/bin/varnishd/cache/cache_ws.c b/bin/varnishd/cache/cache_ws.c
index 3930c4d..91613b5 100644
--- a/bin/varnishd/cache/cache_ws.c
+++ b/bin/varnishd/cache/cache_ws.c
@@ -75,8 +75,8 @@ WS_Init(struct ws *ws, const char *id, void *space, unsigned len)
 	ws->magic = WS_MAGIC;
 	ws->s = space;
 	assert(PAOK(space));
+	len = PRNDDN(len);
 	ws->e = ws->s + len;
-	assert(PAOK(len));
 	ws->f = ws->s;
 	assert(id[0] & 0x40);
 	assert(strlen(id) < sizeof ws->id);



More information about the varnish-commit mailing list