lookup, don't assign canon unconditionally.
+2008-05-16 Ulrich Drepper <drepper@redhat.com>
+
+ * sysdeps/posix/getaddrinfo.c (gaih_inet): After gethostbyname4_r
+ lookup, don't assign canon unconditionally.
+
2008-05-14 Ulrich Drepper <drepper@redhat.com>
* string/Makefile (distribute): Add str-two-way.h.
if (status == NSS_STATUS_SUCCESS)
{
- canon = (*pat)->name;
+ if ((req->ai_flags & AI_CANONNAME) != 0 && canon == NULL)
+ canon = (*pat)->name;
while (*pat != NULL)
pat = &((*pat)->next);
return -EAI_IDN_ENCODE;
}
/* In case the output string is the same as the input
- string no new string has been allocated. Otherwise
+ string no new string has been allocated and we
make a copy. */
if (out == canon)
goto make_copy;