Skip to content
Snippets Groups Projects
Commit f7ddb39e authored by Gisle Vanem's avatar Gisle Vanem
Browse files

iconv-data needs to be fully reallocated (to prevent a double-free).

parent 145084b6
No related branches found
No related tags found
No related merge requests found
......@@ -613,9 +613,12 @@ CURL *curl_easy_duphandle(CURL *incurl)
#endif
#if defined(CURL_DOES_CONVERSIONS) && defined(HAVE_ICONV)
outcurl->outbound_cd = data->outbound_cd;
outcurl->inbound_cd = data->inbound_cd;
outcurl->utf8_cd = data->utf8_cd;
outcurl->inbound_cd = iconv_open(CURL_ICONV_CODESET_OF_HOST,
CURL_ICONV_CODESET_OF_NETWORK);
outcurl->outbound_cd = iconv_open(CURL_ICONV_CODESET_OF_NETWORK,
CURL_ICONV_CODESET_OF_HOST);
outcurl->utf8_cd = iconv_open(CURL_ICONV_CODESET_OF_HOST,
CURL_ICONV_CODESET_FOR_UTF8);
#endif
Curl_easy_initHandleData(outcurl);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment