]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
bugfix #680: Fail if LONG_STR doesn't contain "
authorWillem Toorop <willem@nlnetlabs.nl>
Tue, 18 Oct 2016 19:54:48 +0000 (14:54 -0500)
committerWillem Toorop <willem@nlnetlabs.nl>
Tue, 18 Oct 2016 19:54:48 +0000 (14:54 -0500)
Thanks Robert Edmonds

Changelog
rr.c

index e5f9b0df88bbfc7fd6199fd21263648879398649..2ca00c64e9f7efd0ed105f2f3d8dfe6fd0950372 100644 (file)
--- 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 e8e51f60e08cfc48b4f86fa71604a70053818bef..5bfd04fba720b96190a6dbb7131b38899c36d3df 100644 (file)
--- 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;
                        }
                }