From: Gisle Vanem Date: Sat, 9 Sep 2006 18:23:29 +0000 (+0000) Subject: iconv-data needs to be fully reallocated (to prevent a double-free). X-Git-Tag: curl-7_16_0~194 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f7ddb39ee18a62c22022ec84b1f5242f16abe65d;p=thirdparty%2Fcurl.git iconv-data needs to be fully reallocated (to prevent a double-free). --- diff --git a/lib/easy.c b/lib/easy.c index 37c0c9a01f..0d648064d3 100644 --- a/lib/easy.c +++ b/lib/easy.c @@ -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);