[4.0] 8916322 Don't expect the workspace length to be aligned.
Lasse Karstensen
lkarsten at varnish-software.com
Mon Sep 22 16:38:25 CEST 2014
commit 8916322619ffb5cbb6af59661d602d706ed0674e
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