This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.
Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
nscd and getxxxxx_r () in glibc 2.1.2 are all screwed up. hstcache.c
in nscd has:
while (__gethostbyname2_r (key, AF_INET, &resultbuf, buffer, buflen,
&hst, &h_errno) != 0
&& h_errno == NETDB_INTERNAL
&& errno == ERANGE)
{
errno = 0;
buflen += 256;
buffer = alloca (buflen);
}
However, when getanswer_r in resolve/nss_dns/dns-host.c runs out of
buffer around line 619, it never bothers to set errno nor h_errno. It
does that with
if (result->h_name == NULL)
{
....
}
It is incorrect since getanswer_r can run out of memory after
result->h_name is set. It looks like a mess to me. I hope someone
will fix it soon.
--
H.J. Lu (hjl@gnu.org)
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |