mirror of
https://github.com/curl/curl.git
synced 2025-01-24 14:15:18 +08:00
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:
parent
0965348cd8
commit
a62ece3f57
@ -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);
|
||||
|
||||
|
@ -96,8 +96,6 @@
|
||||
1138
|
||||
1144
|
||||
1147
|
||||
1151
|
||||
1154
|
||||
1156
|
||||
1160
|
||||
1164
|
||||
|
Loading…
Reference in New Issue
Block a user