summaryrefslogtreecommitdiffstats
path: root/lib/libc/net
diff options
context:
space:
mode:
authorkris <kris@FreeBSD.org>2000-07-03 02:33:02 +0000
committerkris <kris@FreeBSD.org>2000-07-03 02:33:02 +0000
commit991a8601b5e75c8134dc66598d63ff2fc3454521 (patch)
treee0155a051abfa120cf625375ffb4457eb98aea6f /lib/libc/net
parent9d75443679e0877c7f00c4846d2ba4c021c065f6 (diff)
downloadFreeBSD-src-991a8601b5e75c8134dc66598d63ff2fc3454521.zip
FreeBSD-src-991a8601b5e75c8134dc66598d63ff2fc3454521.tar.gz
Fix a nasty bug which would leave the struct hostent incompletely filled out
when parsing certain DNS records during a reverse address resolution. Thus when code tries to examine the returned host name, it dereferences a null pointer :-( Problem noticed by: ps
Diffstat (limited to 'lib/libc/net')
-rw-r--r--lib/libc/net/name6.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/net/name6.c b/lib/libc/net/name6.c
index 32fe460..2368d82 100644
--- a/lib/libc/net/name6.c
+++ b/lib/libc/net/name6.c
@@ -1185,7 +1185,7 @@ getanswer(answer, anslen, qname, qtype, template, errp)
continue;
}
strcpy(bp, tbuf);
- tname = bp;
+ template->h_name = bp;
bp += n;
buflen -= n;
continue;
OpenPOWER on IntegriCloud