Commit e818d098 authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

nghttp: Fix off-by-one error when allocating space for request headers

parent 59286adc
......@@ -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<const char*[]>(total_entry_count + 1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment