From c471841c2404d91f8fd4b326800b58cb59b15d3d Mon Sep 17 00:00:00 2001 From: Willem Toorop Date: Tue, 18 Oct 2016 14:54:48 -0500 Subject: [PATCH] bugfix #680: Fail if LONG_STR doesn't contain " Thanks Robert Edmonds --- Changelog | 2 ++ rr.c | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/Changelog b/Changelog index e5f9b0df..2ca00c64 100644 --- a/Changelog +++ b/Changelog @@ -90,6 +90,8 @@ TBD would overflow. Thanks Jan-Piet Mens. * bugfix #771: hmac-sha224, hmac-sha384 and hmac-sha512 keys. Thanks Harald Jenny + * bugfix #680: ldns fails to reject invalidly formatted + RFC 7553 URI RRs. Thanks Robert Edmonds 1.6.17 2014-01-10 * Fix ldns_dnssec_zone_new_frm_fp_l to allow the last parsed line of a 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; } } -- 2.47.3