summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorBill Fenner <fenner@FreeBSD.org>2000-02-16 05:20:11 +0000
committerBill Fenner <fenner@FreeBSD.org>2000-02-16 05:20:11 +0000
commitc4ff53f00c60696bf5ca8291bb112b8f4851f8f2 (patch)
tree84873b9b7cb41a88b99f0dffc3f4b520132f9d55 /lib/libc
parent97af99a77daaedd255a340063ddf122b355c86ac (diff)
Notes
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/net/gethostbydns.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/libc/net/gethostbydns.c b/lib/libc/net/gethostbydns.c
index c5e26a9d32d0..1d17a0a16533 100644
--- a/lib/libc/net/gethostbydns.c
+++ b/lib/libc/net/gethostbydns.c
@@ -664,6 +664,10 @@ _gethostbydnsaddr(addr, len, af)
dprintf("res_query failed (%d)\n", n);
return (NULL);
}
+ if (n > sizeof buf.buf) {
+ dprintf("static buffer is too small (%d)\n", n);
+ return (NULL);
+ }
if (!(hp = gethostanswer(&buf, n, qbuf, T_PTR)))
return (NULL); /* h_errno was set by gethostanswer() */
#ifdef SUNSECURITY