aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGisle Vanem <gvanem@broadpark.no>2006-09-09 18:23:29 +0000
committerGisle Vanem <gvanem@broadpark.no>2006-09-09 18:23:29 +0000
commitf7ddb39ee18a62c22022ec84b1f5242f16abe65d (patch)
tree5b9c5da1a863aa355014303907445e8d66f91874
parent145084b69973fe355a0114f63aef6336f7a94e77 (diff)
iconv-data needs to be fully reallocated (to prevent a double-free).
-rw-r--r--lib/easy.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/easy.c b/lib/easy.c
index 37c0c9a01..0d648064d 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);