summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/net/getnetbydns.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libc/net/getnetbydns.c b/lib/libc/net/getnetbydns.c
index a84fde5..730d796 100644
--- a/lib/libc/net/getnetbydns.c
+++ b/lib/libc/net/getnetbydns.c
@@ -176,7 +176,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++;
OpenPOWER on IntegriCloud