From: Willem Toorop Date: Fri, 13 May 2011 09:24:50 +0000 (+0000) Subject: Fix ldns_dnssec_zone_add_empty_nonterminals to also detect the empty nonterminals... X-Git-Tag: release-1.6.10rc1~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1acbc4f42e79413ee7b056d18e3415eb48d3d416;p=thirdparty%2Fldns.git Fix ldns_dnssec_zone_add_empty_nonterminals to also detect the empty nonterminals for labels that are the same as another at a certain position, but for which some of the parent labels differ. See also: Bug#383. Thanks to Juergen Geinitz. --- diff --git a/dnssec_zone.c b/dnssec_zone.c index 1c6695bc..a989c7f4 100644 --- a/dnssec_zone.c +++ b/dnssec_zone.c @@ -801,11 +801,11 @@ ldns_dnssec_zone_add_empty_nonterminals(ldns_dnssec_zone *zone) for (i = 1; i < next_label_count - soa_label_count; i++) { lpos = (int)cur_label_count - (int)next_label_count + (int)i; if (lpos >= 0) { - l1 = ldns_dname_label(cur_name, (uint8_t)lpos); + l1 = ldns_dname_clone_from(cur_name, (uint8_t)lpos); } else { l1 = NULL; } - l2 = ldns_dname_label(next_name, i); + l2 = ldns_dname_clone_from(next_name, i); if (!l1 || ldns_dname_compare(l1, l2) != 0) { /* We have an empty nonterminal, add it to the