summaryrefslogtreecommitdiff
path: root/libs/libcurl/src/escape.c
diff options
context:
space:
mode:
authordartraiden <wowemuh@gmail.com>2024-09-11 21:49:43 +0300
committerdartraiden <wowemuh@gmail.com>2024-09-11 21:52:35 +0300
commitc36db68a5f58ec6c9135eff778b6e77c30e58088 (patch)
tree22eea126db82c50388c9f94cd683d6ec6f04e6cb /libs/libcurl/src/escape.c
parent02bb82c1c0a4031e7b2f5578370fa5acd620f8e1 (diff)
libcurl: update to 8.10.0
Diffstat (limited to 'libs/libcurl/src/escape.c')
-rw-r--r--libs/libcurl/src/escape.c4
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++;