33 lines
982 B
Diff
33 lines
982 B
Diff
From c9e9c2e4b1bdd880e11ad1d0756da87634456b95 Mon Sep 17 00:00:00 2001
|
|
From: Florian Weimer <fweimer@redhat.com>
|
|
Date: Mon, 15 Dec 2014 17:41:13 +0100
|
|
Subject: [PATCH] Avoid infinite loop in nss_dns getnetbyname [BZ #17630]
|
|
|
|
Conflicts:
|
|
ChangeLog
|
|
NEWS
|
|
---
|
|
ChangeLog | 14 ++++++++++++++
|
|
NEWS | 8 ++++++++
|
|
resolv/nss_dns/dns-network.c | 4 ++--
|
|
3 files changed, 24 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/resolv/nss_dns/dns-network.c b/resolv/nss_dns/dns-network.c
|
|
index 13ad38c..1993ec1 100644
|
|
--- a/resolv/nss_dns/dns-network.c
|
|
+++ b/resolv/nss_dns/dns-network.c
|
|
@@ -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
|
|
--
|
|
2.2.1
|
|
|