]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
1518. [bug] dns_nsec_buildrdata(), and hence dns_nsec_build(),
authorMark Andrews <marka@isc.org>
Wed, 1 Oct 2003 04:07:27 +0000 (04:07 +0000)
committerMark Andrews <marka@isc.org>
Wed, 1 Oct 2003 04:07:27 +0000 (04:07 +0000)
                        contained a off-by-one error when working out the
                        number of octets in the bitmap.

CHANGES
lib/dns/nsec.c

diff --git a/CHANGES b/CHANGES
index 931f231a9f2a2652a013c372400a7f2eb170a3aa..ed6a1e4107cd2e952206e0a513ed893922c60903 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,7 @@
+1518.   [bug]           dns_nsec_buildrdata(), and hence dns_nsec_build(),
+                       contained a off-by-one error when working out the
+                       number of octets in the bitmap.
+
 1517.   [placeholder]
 
 1516.   [func]          Roll the DNSSEC types to RRSIG, NSEC and DNSKEY.
index 5997b4a103c81272cd79771517995c9378ff17ec..6129471ebd7967ef868d70f9620bb2d8fe73179c 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: nsec.c,v 1.2 2003/09/30 06:00:39 marka Exp $ */
+/* $Id: nsec.c,v 1.3 2003/10/01 04:07:27 marka Exp $ */
 
 #include <config.h>
 
@@ -119,7 +119,7 @@ dns_nsec_buildrdata(dns_db_t *db, dns_dbversion_t *version,
        if (result != ISC_R_NOMORE)
                return (result);
 
-       r.length += ((max_type + 7) / 8);
+       r.length += max_type / 8 + 1;
        INSIST(r.length <= DNS_NSEC_BUFFERSIZE);
        dns_rdata_fromregion(rdata,
                             dns_db_class(db),