From e818d098ecd4454f5fb7e4b07f259670dab91da1 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Fri, 30 Aug 2013 21:30:04 +0900 Subject: [PATCH] nghttp: Fix off-by-one error when allocating space for request headers --- src/nghttp.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nghttp.cc b/src/nghttp.cc index 5ca9342d..3317e6b0 100644 --- a/src/nghttp.cc +++ b/src/nghttp.cc @@ -852,7 +852,7 @@ void submit_request(HttpClient *client, int header_count = headers.size(); int total_entry_count = hardcoded_entry_count + header_count * 2; if(req->data_prd) { - ++total_entry_count; + total_entry_count += 2; } auto nv = util::make_unique(total_entry_count + 1);