mirror of
git://sourceware.org/git/glibc.git
synced 2024-11-27 03:41:23 +08:00
getaddrinfo: Fix localplt failure involving strdup
This commit is contained in:
parent
ca4b396ebe
commit
6257fcfd58
@ -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.
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user