about summary refs log tree commit diff
path: root/resolv
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@suse.de>2002-07-02 09:36:44 +0000
committerAndreas Schwab <schwab@suse.de>2002-07-02 09:36:44 +0000
commitf4554c112160f9141bf2de4ee2c03abcb4d6f702 (patch)
treeb22adecffca19752453ef0b173115910df8173a3 /resolv
parent32f65d5daede9d277ceb00b52203ea600b451208 (diff)
downloadglibc-f4554c112160f9141bf2de4ee2c03abcb4d6f702.tar.gz
glibc-f4554c112160f9141bf2de4ee2c03abcb4d6f702.tar.xz
glibc-f4554c112160f9141bf2de4ee2c03abcb4d6f702.zip
* resolv/nss_dns/dns-network.c (getanswer_r): Reduce linebuflen
in parallel to bumping up the buffer pointer.
Diffstat (limited to 'resolv')
-rw-r--r--resolv/nss_dns/dns-network.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/resolv/nss_dns/dns-network.c b/resolv/nss_dns/dns-network.c
index 38acc96dff..105b81f48b 100644
--- a/resolv/nss_dns/dns-network.c
+++ b/resolv/nss_dns/dns-network.c
@@ -328,7 +328,9 @@ getanswer_r (const querybuf *answer, int anslen, struct netent *result,
 	    }
 	  cp += n;
 	  *alias_pointer++ = bp;
-	  bp += strlen (bp) + 1;
+	  n = strlen (bp) + 1;
+	  bp += n;
+	  linebuflen -= n;
 	  result->n_addrtype = class == C_IN ? AF_INET : AF_UNSPEC;
 	  ++have_answer;
 	}