2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-29 21:47:59 +00:00

1519. [bug] dnssec-signzone:nsec_setbit() computed the wrong

length of the new bitmap.
This commit is contained in:
Mark Andrews 2003-10-01 04:10:26 +00:00
parent 49fcdcd940
commit 94be8e357c
2 changed files with 6 additions and 4 deletions

View File

@ -1,3 +1,6 @@
1519. [bug] dnssec-signzone:nsec_setbit() computed the wrong
length of the new bitmap.
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.

View File

@ -17,7 +17,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dnssec-signzone.c,v 1.169 2003/09/30 05:56:00 marka Exp $ */
/* $Id: dnssec-signzone.c,v 1.170 2003/10/01 04:10:26 marka Exp $ */
#include <config.h>
@ -664,10 +664,9 @@ nsec_setbit(dns_name_t *name, dns_rdataset_t *rdataset, dns_rdatatype_t type,
result = dns_rdata_tostruct(&rdata, &nsec, NULL);
check_result(result, "dns_rdata_tostruct");
newlen = type / 8 + 1;
INSIST(nsec.len <= sizeof(bitmap));
INSIST(nsec.len < sizeof(bitmap));
INSIST(newlen < sizeof(bitmap));
newlen = sizeof(bitmap);
memset(bitmap, 0, sizeof(bitmap));
memcpy(bitmap, nsec.typebits, nsec.len);