diff options
| author | Bill Fenner <fenner@FreeBSD.org> | 2000-02-16 04:39:00 +0000 |
|---|---|---|
| committer | Bill Fenner <fenner@FreeBSD.org> | 2000-02-16 04:39:00 +0000 |
| commit | 686d0736aac70189275919cc349ad9aea51e470f (patch) | |
| tree | ce6b0043e8eb6d7d6f5b9390c174d176159cbdd5 | |
| parent | 528b8853bb5aaf3e37c8b92ae09c01c518b969bb (diff) | |
Notes
| -rw-r--r-- | lib/libc/net/gethostbydns.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/libc/net/gethostbydns.c b/lib/libc/net/gethostbydns.c index a77b65df363c..a5a3e7bb30fe 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 |
