aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/curl/lib/non-ascii.c
diff options
context:
space:
mode:
authorshadchin <shadchin@yandex-team.ru>2022-04-10 23:38:39 +0300
committershadchin <shadchin@yandex-team.ru>2022-04-10 23:38:39 +0300
commitd0d27ff451c16dbec7fbc99206cba32803c52cc6 (patch)
tree9ab7a06c0bb58e38fe848af1bb8623f468900ba6 /contrib/libs/curl/lib/non-ascii.c
parent37591f1db8ea08ea964badf4ff15f8a923271524 (diff)
downloadydb-d0d27ff451c16dbec7fbc99206cba32803c52cc6.tar.gz
CONTRIB-2513 Update contrib/libs/curl to 7.79.1
ref:cfccba5015904b0f0cadfc018200e2a1b4d50ae6
Diffstat (limited to 'contrib/libs/curl/lib/non-ascii.c')
-rw-r--r--contrib/libs/curl/lib/non-ascii.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/contrib/libs/curl/lib/non-ascii.c b/contrib/libs/curl/lib/non-ascii.c
index 932cf89eef6..3b77ae98d52 100644
--- a/contrib/libs/curl/lib/non-ascii.c
+++ b/contrib/libs/curl/lib/non-ascii.c
@@ -31,6 +31,7 @@
#include "sendf.h"
#include "urldata.h"
#include "multiif.h"
+#include "strerror.h"
#include "curl_memory.h"
/* The last #include file should be: */
@@ -104,6 +105,7 @@ CURLcode Curl_convert_to_network(struct Curl_easy *data,
iconv_t *cd = &tmpcd;
char *input_ptr, *output_ptr;
size_t in_bytes, out_bytes, rc;
+ char ebuffer[STRERROR_LEN];
/* open an iconv conversion descriptor if necessary */
if(data)
@@ -116,7 +118,7 @@ CURLcode Curl_convert_to_network(struct Curl_easy *data,
"The iconv_open(\"%s\", \"%s\") call failed with errno %i: %s",
CURL_ICONV_CODESET_OF_NETWORK,
CURL_ICONV_CODESET_OF_HOST,
- errno, strerror(errno));
+ errno, Curl_strerror(errno, ebuffer, sizeof(ebuffer)));
return CURLE_CONV_FAILED;
}
}
@@ -130,7 +132,7 @@ CURLcode Curl_convert_to_network(struct Curl_easy *data,
if((rc == ICONV_ERROR) || (in_bytes)) {
failf(data,
"The Curl_convert_to_network iconv call failed with errno %i: %s",
- errno, strerror(errno));
+ errno, Curl_strerror(errno, ebuffer, sizeof(ebuffer)));
return CURLE_CONV_FAILED;
}
#else
@@ -170,6 +172,7 @@ CURLcode Curl_convert_from_network(struct Curl_easy *data,
iconv_t *cd = &tmpcd;
char *input_ptr, *output_ptr;
size_t in_bytes, out_bytes, rc;
+ char ebuffer[STRERROR_LEN];
/* open an iconv conversion descriptor if necessary */
if(data)
@@ -182,7 +185,7 @@ CURLcode Curl_convert_from_network(struct Curl_easy *data,
"The iconv_open(\"%s\", \"%s\") call failed with errno %i: %s",
CURL_ICONV_CODESET_OF_HOST,
CURL_ICONV_CODESET_OF_NETWORK,
- errno, strerror(errno));
+ errno, Curl_strerror(errno, ebuffer, sizeof(ebuffer)));
return CURLE_CONV_FAILED;
}
}
@@ -196,7 +199,7 @@ CURLcode Curl_convert_from_network(struct Curl_easy *data,
if((rc == ICONV_ERROR) || (in_bytes)) {
failf(data,
"Curl_convert_from_network iconv call failed with errno %i: %s",
- errno, strerror(errno));
+ errno, Curl_strerror(errno, ebuffer, sizeof(ebuffer)));
return CURLE_CONV_FAILED;
}
#else
@@ -237,6 +240,7 @@ CURLcode Curl_convert_from_utf8(struct Curl_easy *data,
char *input_ptr;
char *output_ptr;
size_t in_bytes, out_bytes, rc;
+ char ebuffer[STRERROR_LEN];
/* open an iconv conversion descriptor if necessary */
if(data)
@@ -249,7 +253,7 @@ CURLcode Curl_convert_from_utf8(struct Curl_easy *data,
"The iconv_open(\"%s\", \"%s\") call failed with errno %i: %s",
CURL_ICONV_CODESET_OF_HOST,
CURL_ICONV_CODESET_FOR_UTF8,
- errno, strerror(errno));
+ errno, Curl_strerror(errno, ebuffer, sizeof(ebuffer)));
return CURLE_CONV_FAILED;
}
}
@@ -263,7 +267,7 @@ CURLcode Curl_convert_from_utf8(struct Curl_easy *data,
if((rc == ICONV_ERROR) || (in_bytes)) {
failf(data,
"The Curl_convert_from_utf8 iconv call failed with errno %i: %s",
- errno, strerror(errno));
+ errno, Curl_strerror(errno, ebuffer, sizeof(ebuffer)));
return CURLE_CONV_FAILED;
}
if(output_ptr < input_ptr) {