[6.0] d48317b36 handle workspace overflow in V1F_Setup_Fetch()

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Thu Aug 16 08:52:41 UTC 2018


commit d48317b3676d6fb4ccff452bbb9fe59aa3fa76e7
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Wed Apr 11 12:08:09 2018 +0200

    handle workspace overflow in V1F_Setup_Fetch()
    
    Ref #2645 but cannot be the cause because workspace is just not
    overflowed

diff --git a/bin/varnishd/http1/cache_http1_fetch.c b/bin/varnishd/http1/cache_http1_fetch.c
index 1a7702120..27bf52101 100644
--- a/bin/varnishd/http1/cache_http1_fetch.c
+++ b/bin/varnishd/http1/cache_http1_fetch.c
@@ -216,7 +216,11 @@ V1F_FetchRespHdr(struct busyobj *bo)
 	assert(bo->vfc->resp == bo->beresp);
 	if (bo->htc->body_status != BS_NONE &&
 	    bo->htc->body_status != BS_ERROR)
-		(void)V1F_Setup_Fetch(bo->vfc, bo->htc);
+		if (V1F_Setup_Fetch(bo->vfc, bo->htc)) {
+			VSLb(bo->vsl, SLT_FetchError, "overflow");
+			htc->doclose = SC_RX_OVERFLOW;
+			return (-1);
+		}
 
 	return (0);
 }


More information about the varnish-commit mailing list