diff options
author | dartraiden <wowemuh@gmail.com> | 2024-09-11 21:49:43 +0300 |
---|---|---|
committer | dartraiden <wowemuh@gmail.com> | 2024-09-11 21:52:35 +0300 |
commit | c36db68a5f58ec6c9135eff778b6e77c30e58088 (patch) | |
tree | 22eea126db82c50388c9f94cd683d6ec6f04e6cb /libs/libcurl/src/escape.c | |
parent | 02bb82c1c0a4031e7b2f5578370fa5acd620f8e1 (diff) |
libcurl: update to 8.10.0
Diffstat (limited to 'libs/libcurl/src/escape.c')
-rw-r--r-- | libs/libcurl/src/escape.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/libcurl/src/escape.c b/libs/libcurl/src/escape.c index 96e108cd2c..1b708a64f6 100644 --- a/libs/libcurl/src/escape.c +++ b/libs/libcurl/src/escape.c @@ -63,12 +63,12 @@ char *curl_easy_escape(struct Curl_easy *data, const char *string, 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++;
|