summaryrefslogtreecommitdiffstats
path: root/lib/libc/net/gethostbydns.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/net/gethostbydns.c')
-rw-r--r--lib/libc/net/gethostbydns.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libc/net/gethostbydns.c b/lib/libc/net/gethostbydns.c
index 47ca575..2862236 100644
--- a/lib/libc/net/gethostbydns.c
+++ b/lib/libc/net/gethostbydns.c
@@ -397,6 +397,7 @@ gethostanswer(answer, anslen, qname, qtype)
}
bp += sizeof(align) - ((u_long)bp % sizeof(align));
+ buflen -= sizeof(align) - ((u_long)bp % sizeof(align));
if (bp + n >= &hostbuf[sizeof hostbuf]) {
dprintf("size (%d) too big\n", n);
OpenPOWER on IntegriCloud