summaryrefslogtreecommitdiff
path: root/libs/libcurl/src/escape.c
diff options
context:
space:
mode:
authordartraiden <wowemuh@gmail.com>2024-07-25 00:50:30 +0300
committerdartraiden <wowemuh@gmail.com>2024-07-25 02:38:23 +0300
commit67a42fc97c64c83e02f6f0d68e5a4a22c71138d3 (patch)
tree21eb2d53a9cd7e645a58662dee11588f56057eee /libs/libcurl/src/escape.c
parent0a365886f2d06750a707037d894e1492988eb53c (diff)
libcurl: update to 8.9.0
Diffstat (limited to 'libs/libcurl/src/escape.c')
-rw-r--r--libs/libcurl/src/escape.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/libs/libcurl/src/escape.c b/libs/libcurl/src/escape.c
index a64137c8ae..b154c584f6 100644
--- a/libs/libcurl/src/escape.c
+++ b/libs/libcurl/src/escape.c
@@ -70,7 +70,8 @@ char *curl_easy_escape(struct Curl_easy *data, const char *string,
return strdup("");
while(length--) {
- unsigned char in = *string++; /* treat the characters unsigned */
+ /* treat the characters unsigned */
+ unsigned char in = (unsigned char)*string++;
if(ISUNRESERVED(in)) {
/* append this */
@@ -137,7 +138,7 @@ CURLcode Curl_urldecode(const char *string, size_t length,
*ostring = ns;
while(alloc) {
- unsigned char in = *string;
+ unsigned char in = (unsigned char)*string;
if(('%' == in) && (alloc > 2) &&
ISXDIGIT(string[1]) && ISXDIGIT(string[2])) {
/* this is two hexadecimal digits following a '%' */
@@ -157,7 +158,7 @@ CURLcode Curl_urldecode(const char *string, size_t length,
return CURLE_URL_MALFORMAT;
}
- *ns++ = in;
+ *ns++ = (char)in;
}
*ns = 0; /* terminate it */
@@ -222,8 +223,8 @@ void Curl_hexencode(const unsigned char *src, size_t len, /* input length */
while(len-- && (olen >= 3)) {
/* clang-tidy warns on this line without this comment: */
/* NOLINTNEXTLINE(clang-analyzer-core.UndefinedBinaryOperatorResult) */
- *out++ = hex[(*src & 0xF0)>>4];
- *out++ = hex[*src & 0x0F];
+ *out++ = (unsigned char)hex[(*src & 0xF0)>>4];
+ *out++ = (unsigned char)hex[*src & 0x0F];
++src;
olen -= 2;
}