From: Matthijs Mekking Date: Tue, 10 Nov 2009 14:39:32 +0000 (+0000) Subject: bugfix DLV not in NSEC X-Git-Tag: release-1.6.2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=378f02ec6fc3c41bf4c8e0d7e8264d682f2f0ed3;p=thirdparty%2Fldns.git bugfix DLV not in NSEC (because rr_list is not in order) --- diff --git a/dnssec.c b/dnssec.c index 8eeaa2c7..f1689128 100644 --- a/dnssec.c +++ b/dnssec.c @@ -635,12 +635,15 @@ ldns_dnssec_create_nsec_bitmap(ldns_rr_type rr_type_list[], return NULL; } - /* the types in the list should be orders, lowest first, - so the last one contains the highest type */ - i_type = rr_type_list[size-1]; + i_type = 0; + for (i = 0; i < size; i++) { + if (i_type < rr_type_list[i]) + i_type = rr_type_list[i]; + } if (i_type < nsec_type) { i_type = nsec_type; } + bm_len = i_type / 8 + 2; bitmap = LDNS_XMALLOC(uint8_t, bm_len); for (i = 0; i < bm_len; i++) {