This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch master updated. glibc-2.25-389-g6257fcf
- From: fw at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 2 Jun 2017 18:03:30 -0000
- Subject: GNU C Library master sources branch master updated. glibc-2.25-389-g6257fcf
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via 6257fcfd58479f6b7ae0fdde045b9ff144d543da (commit)
from ca4b396ebebf8869e199268edbb5808bb5488c50 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6257fcfd58479f6b7ae0fdde045b9ff144d543da
commit 6257fcfd58479f6b7ae0fdde045b9ff144d543da
Author: Florian Weimer <fweimer@redhat.com>
Date: Fri Jun 2 16:35:13 2017 +0200
getaddrinfo: Fix localplt failure involving strdup
diff --git a/ChangeLog b/ChangeLog
index 2b0a09b..f37370c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2017-06-02 Florian Weimer <fweimer@redhat.com>
+
+ * sysdeps/posix/getaddrinfo.c (gethosts): Eliminate another
+ strdupa.
+ (getcanonname): Use __strdup instead of strdup.
+
2017-06-02 Adhemerval Zanella <adhemerval.zanella@linaro.org>
* misc/Makefile (CFLAGS-preadv2.c): New rule.
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index d92db70..a8b5bb5 100644
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -286,9 +286,16 @@ convert_hostent_to_gaih_addrtuple (const struct addrinfo *req,
} \
*pat = addrmem; \
\
- if (localcanon != NULL && canon == NULL) \
- canon = strdupa (localcanon); \
- \
+ if (localcanon != NULL && canon == NULL) \
+ { \
+ canonbuf = __strdup (localcanon); \
+ if (canonbuf == NULL) \
+ { \
+ result = -EAI_SYSTEM; \
+ goto free_and_return; \
+ } \
+ canon = canonbuf; \
+ } \
if (_family == AF_INET6 && *pat != NULL) \
got_ipv6 = true; \
} \
@@ -330,7 +337,7 @@ getcanonname (service_user *nip, struct gaih_addrtuple *at, const char *name)
string. */
s = (char *) name;
}
- return strdup (name);
+ return __strdup (name);
}
static int
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 6 ++++++
sysdeps/posix/getaddrinfo.c | 15 +++++++++++----
2 files changed, 17 insertions(+), 4 deletions(-)
hooks/post-receive
--
GNU C Library master sources