[master] b71ccdeb8 Add an assert that the status is valid on entry to h2_build_headers
Martin Blix Grydeland
martin at varnish-software.com
Tue May 5 11:39:07 UTC 2020
commit b71ccdeb8bda20cf37425b0622a0e06a6d7f45f3
Author: Martin Blix Grydeland <martin at varnish-software.com>
Date: Tue May 5 13:36:22 2020 +0200
Add an assert that the status is valid on entry to h2_build_headers
diff --git a/bin/varnishd/http2/cache_http2_deliver.c b/bin/varnishd/http2/cache_http2_deliver.c
index 675e9bd29..c2ef90eec 100644
--- a/bin/varnishd/http2/cache_http2_deliver.c
+++ b/bin/varnishd/http2/cache_http2_deliver.c
@@ -232,6 +232,7 @@ h2_build_headers(struct vsb *resp, struct req *req)
uint8_t buf[6];
ssize_t sz, sz1;
+ assert(req->resp->status % 1000 >= 100);
l = h2_status(buf, req->resp->status % 1000);
VSB_bcat(resp, buf, l);
More information about the varnish-commit
mailing list