summaryrefslogtreecommitdiffstats
path: root/lib/libc/net/hesiod.c
diff options
context:
space:
mode:
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 701244a..c22bdba 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. */
OpenPOWER on IntegriCloud