Instead of capping it to the 3 * CURL_MAX_INPUT_LENGTH. To allow users
to URL encode larger chunks of data.
Closes #14339
if(!string || (inlength < 0))
return NULL;
- Curl_dyn_init(&d, CURL_MAX_INPUT_LENGTH * 3);
-
length = (inlength?(size_t)inlength:strlen(string));
if(!length)
return strdup("");
+ Curl_dyn_init(&d, length * 3 + 1);
+
while(length--) {
/* treat the characters unsigned */
unsigned char in = (unsigned char)*string++;