mirror of
https://github.com/curl/curl.git
synced 2026-07-23 18:17:15 +03:00
curl_easy_escape: limit output string length to 3 * max input
... instead of the limiting it to just the max input size. As every input byte can be expanded to 3 output bytes, this could limit the input string to 2.66 MB instead of the intended 8 MB. Reported-by: Marc Schlatter Closes #6192
This commit is contained in:
parent
8b151cb944
commit
7ae59838f0
1 changed files with 1 additions and 1 deletions
|
|
@ -86,7 +86,7 @@ char *curl_easy_escape(struct Curl_easy *data, const char *string,
|
|||
if(inlength < 0)
|
||||
return NULL;
|
||||
|
||||
Curl_dyn_init(&d, CURL_MAX_INPUT_LENGTH);
|
||||
Curl_dyn_init(&d, CURL_MAX_INPUT_LENGTH * 3);
|
||||
|
||||
length = (inlength?(size_t)inlength:strlen(string));
|
||||
if(!length)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue