1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-10 11:35:07 -05:00

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

This commit is contained in:
Gisle Vanem 2006-09-09 18:23:29 +00:00
parent 145084b699
commit f7ddb39ee1

View File

@ -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);