From: Andreas Schwab Date: Thu, 4 Aug 2011 19:42:10 +0000 (-0400) Subject: Fix encoding name for IDN in getaddrinfo X-Git-Tag: glibc-2.14.1~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c57be1aeee682c02664e5d92b8c597a376611bfe;p=thirdparty%2Fglibc.git Fix encoding name for IDN in getaddrinfo (cherry picked from commit 2e96f1c73b06e81da59ef7fffa426dc201875f31) --- diff --git a/ChangeLog b/ChangeLog index 2f637949836..cdaab23fafd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-07-26 Andreas Schwab + + * sysdeps/posix/getaddrinfo.c (gaih_inet): Don't discard result of + encoding to ACE if AI_IDN. + 2011-07-25 Andreas Schwab * sysdeps/i386/i486/bits/string.h (__strncat_g): Correctly handle diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c index 27ce75edc19..13dbe10cece 100644 --- a/sysdeps/posix/getaddrinfo.c +++ b/sysdeps/posix/getaddrinfo.c @@ -432,7 +432,10 @@ gaih_inet (const char *name, const struct gaih_service *service, /* In case the output string is the same as the input string no new string has been allocated. */ if (p != name) - malloc_name = true; + { + name = p; + malloc_name = true; + } } #endif