1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-28 00:21:52 +03:00

Avoid infinite loop in nss_dns getnetbyname [BZ #17630]

This commit is contained in:
Florian Weimer
2014-12-15 17:41:13 +01:00
parent ae61fc7b33
commit 11e3417af6
3 changed files with 13 additions and 4 deletions

View File

@ -398,8 +398,8 @@ getanswer_r (const querybuf *answer, int anslen, struct netent *result,
case BYNAME:
{
char **ap = result->n_aliases++;
while (*ap != NULL)
char **ap;
for (ap = result->n_aliases; *ap != NULL; ++ap)
{
/* Check each alias name for being of the forms:
4.3.2.1.in-addr.arpa = net 1.2.3.4