summaryrefslogtreecommitdiff
path: root/rr.c
diff options
context:
space:
mode:
authorWillem Toorop <willem@nlnetlabs.nl>2016-10-18 21:54:48 +0200
committerWillem Toorop <willem@nlnetlabs.nl>2016-10-18 21:54:48 +0200
commitc471841c2404d91f8fd4b326800b58cb59b15d3d (patch)
tree07f5fddecdc6e70fc20e1551bb87a8a8d0498789 /rr.c
parent1eb44ba0665dd48802c5089c2879776739aac07e (diff)
downloadldns-c471841c2404d91f8fd4b326800b58cb59b15d3d.tar.gz
bugfix #680: Fail if LONG_STR doesn't contain "
Thanks Robert Edmonds
Diffstat (limited to 'rr.c')
-rw-r--r--rr.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/rr.c b/rr.c
index e8e51f60..5bfd04fb 100644
--- a/rr.c
+++ b/rr.c
@@ -368,6 +368,11 @@ ldns_rr_new_frm_str_internal(ldns_rr **newrr, const char *str,
delimiters = "\"\0";
ldns_buffer_skip(rd_buf, 1);
quoted = true;
+ } else if (ldns_rr_descriptor_field_type(desc, r_cnt)
+ == LDNS_RDF_TYPE_LONG_STR) {
+
+ status = LDNS_STATUS_SYNTAX_RDATA_ERR;
+ goto error;
}
}