c-hyper: bail on too long response headers

To match with built-in behaviors. Makes test 1154 work.

Closes #7350
This commit is contained in:
Daniel Stenberg 2021-07-05 17:13:29 +02:00
parent 0965348cd8
commit a62ece3f57
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
2 changed files with 6 additions and 2 deletions

View File

@ -126,6 +126,12 @@ static int hyper_each_header(void *userdata,
CURLcode result;
int writetype;
if(name_len + value_len + 2 > CURL_MAX_HTTP_HEADER) {
failf(data, "Too long response header");
data->state.hresult = CURLE_OUT_OF_MEMORY;
return HYPER_ITER_BREAK;
}
if(!data->req.bytecount)
Curl_pgrsTime(data, TIMER_STARTTRANSFER);

View File

@ -96,8 +96,6 @@
1138
1144
1147
1151
1154
1156
1160
1164