aboutsummaryrefslogtreecommitdiff
path: root/hesiod/hesiod.c
diff options
context:
space:
mode:
Diffstat (limited to 'hesiod/hesiod.c')
-rw-r--r--hesiod/hesiod.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hesiod/hesiod.c b/hesiod/hesiod.c
index 6ecbad1..c2925a0 100644
--- a/hesiod/hesiod.c
+++ b/hesiod/hesiod.c
@@ -398,7 +398,7 @@ get_txt_records(struct hesiod_p *ctx, int class, const char *name) {
cp += INT16SZ + INT32SZ; /* skip the ttl, too */
rr.dlen = ns_get16(cp);
cp += INT16SZ;
- if (cp + rr.dlen > eom) {
+ if (rr.dlen == 0 || cp + rr.dlen > eom) {
__set_errno(EMSGSIZE);
goto cleanup;
}