summaryrefslogtreecommitdiff
path: root/lib/libc/net/hesiod.c
diff options
context:
space:
mode:
authorJacques Vidrine <nectar@FreeBSD.org>2002-09-15 16:51:09 +0000
committerJacques Vidrine <nectar@FreeBSD.org>2002-09-15 16:51:09 +0000
commit54384cf3b09666a9d10902735fcb3ef9cd6b5faf (patch)
treeb148cf252878680c37bb7a53070e4d454eed0300 /lib/libc/net/hesiod.c
parent99d1c26b7d1f22b45bfe5ec1d7adfbb3b4253ad1 (diff)
Notes
Diffstat (limited to 'lib/libc/net/hesiod.c')
-rw-r--r--lib/libc/net/hesiod.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/net/hesiod.c b/lib/libc/net/hesiod.c
index 701244ac8c22..c22bdbad836b 100644
--- a/lib/libc/net/hesiod.c
+++ b/lib/libc/net/hesiod.c
@@ -386,8 +386,8 @@ get_txt_records(qclass, name)
/* Send the query. */
n = res_send(qbuf, n, abuf, MAX_HESRESP);
- if (n < 0) {
- errno = ECONNREFUSED;
+ if (n < 0 || n > MAX_HESRESP) {
+ errno = ECONNREFUSED; /* XXX */
return NULL;
}
/* Parse the header of the result. */