diff options
| author | Trevor Johnson <trevor@FreeBSD.org> | 2002-07-10 06:48:21 +0000 |
|---|---|---|
| committer | Trevor Johnson <trevor@FreeBSD.org> | 2002-07-10 06:48:21 +0000 |
| commit | a29ea63414f94ed7dd287bf78f5e13be7d719f7f (patch) | |
| tree | 16500173add4148a71a1195f57d06bae15a9b664 | |
| parent | 74674d292af81006fc70d5dc9e81c43b8a34845b (diff) | |
Notes
| -rw-r--r-- | lib/libc/net/gethostbydns.c | 1 | ||||
| -rw-r--r-- | lib/libc/net/getnetbydns.c | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/lib/libc/net/gethostbydns.c b/lib/libc/net/gethostbydns.c index 32271db6bbd0b..0187d7c6706a7 100644 --- a/lib/libc/net/gethostbydns.c +++ b/lib/libc/net/gethostbydns.c @@ -388,6 +388,7 @@ 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 65d9d2de96d8e..26601f858e242 100644 --- a/lib/libc/net/getnetbydns.c +++ b/lib/libc/net/getnetbydns.c @@ -174,7 +174,9 @@ static char *net_aliases[MAXALIASES], netbuf[PACKETSZ]; } cp += n; *ap++ = bp; - bp += strlen(bp) + 1; + n = strlen(bp) + 1; + bp += n; + buflen -= n; net_entry.n_addrtype = (class == C_IN) ? AF_INET : AF_UNSPEC; haveanswer++; |
