summaryrefslogtreecommitdiff
path: root/lib/libc/net
diff options
context:
space:
mode:
authorcvs2svn <cvs2svn@FreeBSD.org>2002-07-03 13:01:43 +0000
committercvs2svn <cvs2svn@FreeBSD.org>2002-07-03 13:01:43 +0000
commit148a348454a0bbec0dab6f790e7d47c9850c0128 (patch)
tree2770dec874759bf70934f5db3c3c5aed108a1fb1 /lib/libc/net
parentdb0a3b09965d55f9dee7a58fb04e31df42b6ae73 (diff)
Diffstat (limited to 'lib/libc/net')
-rw-r--r--lib/libc/net/gethostbydns.c1
-rw-r--r--lib/libc/net/getnetbydns.c4
-rw-r--r--lib/libc/net/name6.c4
3 files changed, 2 insertions, 7 deletions
diff --git a/lib/libc/net/gethostbydns.c b/lib/libc/net/gethostbydns.c
index 52ac91a041be6..a5a3e7bb30fe6 100644
--- a/lib/libc/net/gethostbydns.c
+++ b/lib/libc/net/gethostbydns.c
@@ -389,7 +389,6 @@ gethostanswer(answer, anslen, qname, qtype)
buflen -= nn;
}
- buflen -= sizeof(align) - ((u_long)bp % sizeof(align));
bp += sizeof(align) - ((u_long)bp % sizeof(align));
if (bp + n >= &hostbuf[sizeof hostbuf]) {
diff --git a/lib/libc/net/getnetbydns.c b/lib/libc/net/getnetbydns.c
index e1a11d2e5d3ac..087aa5f6b9bfc 100644
--- a/lib/libc/net/getnetbydns.c
+++ b/lib/libc/net/getnetbydns.c
@@ -173,9 +173,7 @@ static char *net_aliases[MAXALIASES], netbuf[PACKETSZ];
}
cp += n;
*ap++ = bp;
- n = strlen(bp) + 1;
- bp += n;
- buflen -= n;
+ bp += strlen(bp) + 1;
net_entry.n_addrtype =
(class == C_IN) ? AF_INET : AF_UNSPEC;
haveanswer++;
diff --git a/lib/libc/net/name6.c b/lib/libc/net/name6.c
index 401786811b500..8edcb1bee8586 100644
--- a/lib/libc/net/name6.c
+++ b/lib/libc/net/name6.c
@@ -1024,7 +1024,7 @@ getanswer(answer, anslen, qname, qtype, template, errp)
register const u_char *cp;
register int n;
const u_char *eom, *erdata;
- char *bp, **ap, **hap, *obp;
+ char *bp, **ap, **hap;
int type, class, buflen, ancount, qdcount;
int haveanswer, had_error;
char tbuf[MAXDNAME];
@@ -1238,9 +1238,7 @@ getanswer(answer, anslen, qname, qtype, template, errp)
bp += nn;
buflen -= nn;
}
- obp = bp; /* ALIGN rounds up */
bp = (char *)ALIGN(bp);
- buflen -= (bp - obp);
DNS_FATAL(bp + n < &hostbuf[sizeof hostbuf]);
DNS_ASSERT(hap < &h_addr_ptrs[MAXADDRS-1]);