From f4554c112160f9141bf2de4ee2c03abcb4d6f702 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Tue, 2 Jul 2002 09:36:44 +0000 Subject: [PATCH] * resolv/nss_dns/dns-network.c (getanswer_r): Reduce linebuflen in parallel to bumping up the buffer pointer. --- resolv/nss_dns/dns-network.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/resolv/nss_dns/dns-network.c b/resolv/nss_dns/dns-network.c index 38acc96..105b81f 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; } -- 2.7.4