From 9c91ec778104ae3b744b39444d544e82d5ee9ece Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 12 Oct 2016 09:01:06 +0200 Subject: idn: switch to libidn2 use and IDNA2008 support CVE-2016-8625 Bug: https://curl.haxx.se/docs/adv_20161102K.html Reported-by: Christian Heimes --- lib/easy.c | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'lib/easy.c') diff --git a/lib/easy.c b/lib/easy.c index 517c39ffc..cb0ac6740 100644 --- a/lib/easy.c +++ b/lib/easy.c @@ -144,28 +144,6 @@ static CURLcode win32_init(void) return CURLE_OK; } -#ifdef USE_LIBIDN -/* - * Initialise use of IDNA library. - * It falls back to ASCII if $CHARSET isn't defined. This doesn't work for - * idna_to_ascii_lz(). - */ -static void idna_init (void) -{ -#ifdef WIN32 - char buf[60]; - UINT cp = GetACP(); - - if(!getenv("CHARSET") && cp > 0) { - snprintf(buf, sizeof(buf), "CHARSET=cp%u", cp); - putenv(buf); - } -#else - /* to do? */ -#endif -} -#endif /* USE_LIBIDN */ - /* true globals -- for curl_global_init() and curl_global_cleanup() */ static unsigned int initialized; static long init_flags; @@ -262,10 +240,6 @@ static CURLcode global_init(long flags, bool memoryfuncs) } #endif -#ifdef USE_LIBIDN - idna_init(); -#endif - if(Curl_resolver_global_init()) { DEBUGF(fprintf(stderr, "Error: resolver_global_init failed\n")); return CURLE_FAILED_INIT; -- cgit v1.2.3