glibc/glibc-RHEL-16643-5.patch
2024-01-08 14:49:32 +01:00

26 lines
883 B
Diff

commit 3bf7bab88b0da01d4f5ef20afbbb45203185501e
Author: Siddhesh Poyarekar <siddhesh@sourceware.org>
Date: Tue Sep 5 17:04:05 2023 -0400
getcanonname: Fix a typo
This code is generally unused in practice since there don't seem to be
any NSS modules that only implement _nss_MOD_gethostbyname2_r and not
_nss_MOD_gethostbyname3_r.
Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index 40a32a3de30cb294..e9f47aea358a3351 100644
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -346,7 +346,7 @@ getcanonname (nss_action_list nip, const char *hname, const char *name)
string. */
s = (char *) name;
}
- return __strdup (name);
+ return __strdup (s);
}
/* Process looked up canonical name and if necessary, decode to IDNA. Result