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

This commit is contained in:
Tatsuhiro Tsujikawa 2013-08-30 21:30:04 +09:00
parent 59286adc5e
commit e818d098ec
1 changed files with 1 additions and 1 deletions

View File

@ -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);