This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: PINE-CERT libbind issue
- From: Andreas Schwab <schwab at suse dot de>
- To: libc-alpha at sources dot redhat dot com
- Date: Tue, 02 Jul 2002 11:25:22 +0200
- Subject: Re: PINE-CERT libbind issue
- References: <87elenbele.fsf@CERT.Uni-Stuttgart.DE>
Florian Weimer <Weimer@CERT.Uni-Stuttgart.DE> writes:
|> Is someone already checking if this affects the code in libc/resolv?
The following patch is needed in libnss_dns:
2002-07-02 Andreas Schwab <schwab@suse.de>
* resolv/nss_dns/dns-network.c (getanswer_r): Reduce linebuflen
in parallel to bumping up the buffer pointer.
--- resolv/nss_dns/dns-network.c.~1.10.~ 2001-07-16 10:43:47.000000000 +0200
+++ resolv/nss_dns/dns-network.c 2002-06-27 13:35:41.000000000 +0200
@@ -328,7 +328,9 @@ getanswer_r (const querybuf *answer, int
}
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;
}
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."