2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

1932. [bug] dump_rdataset_raw() had a incorrect INSIST. [RT #15534]

This commit is contained in:
Mark Andrews
2005-10-21 03:13:59 +00:00
parent 2c2799117d
commit 203629e729
2 changed files with 6 additions and 3 deletions

View File

@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: masterdump.c,v 1.81 2005/09/20 04:22:44 marka Exp $ */
/* $Id: masterdump.c,v 1.82 2005/10/21 03:13:59 marka Exp $ */
/*! \file */
@@ -910,7 +910,7 @@ dump_rdataset_raw(isc_mem_t *mctx, dns_name_t *name, dns_rdataset_t *rdataset,
dns_rdataset_current(rdataset, &rdata);
dns_rdata_toregion(&rdata, &r);
INSIST(r.length <= DNS_NAME_MAXWIRE);
INSIST(r.length <= 0xffffU);
dlen = (isc_uint16_t)r.length;
/*
@@ -919,7 +919,8 @@ dump_rdataset_raw(isc_mem_t *mctx, dns_name_t *name, dns_rdataset_t *rdataset,
* entire procedure (or should we copy the old data and
* continue?).
*/
if (isc_buffer_availablelength(buffer) < dlen + r.length) {
if (isc_buffer_availablelength(buffer) <
sizeof(dlen) + r.length) {
int newlength;
void *newmem;