[master] 44aca24 Round up vary length

Martin Blix Grydeland martin at varnish-software.com
Tue Sep 23 13:33:24 CEST 2014


commit 44aca24dc521e6f952b19ab5a548cbc71d15b418
Author: Martin Blix Grydeland <martin at varnish-software.com>
Date:   Mon Sep 22 14:02:55 2014 +0200

    Round up vary length
    
    Round up vary length to make sure that the object workspace can take
    the rounded up Vary string without overflowing.

diff --git a/bin/varnishd/cache/cache_fetch.c b/bin/varnishd/cache/cache_fetch.c
index 38e72f0..a4aa167 100644
--- a/bin/varnishd/cache/cache_fetch.c
+++ b/bin/varnishd/cache/cache_fetch.c
@@ -106,7 +106,7 @@ vbf_beresp2obj(struct busyobj *bo)
 		if (varyl > 0) {
 			AN(vary);
 			assert(varyl == VSB_len(vary));
-			l += varyl;
+			l += PRNDUP(varyl);
 		} else if (varyl < 0) {
 			/*
 			 * Vary parse error



More information about the varnish-commit mailing list