]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
pullup:
authorMark Andrews <marka@isc.org>
Tue, 30 Oct 2001 01:56:13 +0000 (01:56 +0000)
committerMark Andrews <marka@isc.org>
Tue, 30 Oct 2001 01:56:13 +0000 (01:56 +0000)
1074.   [bug]           Running out of memory in dump_rdataset() could
                        cause an assertion failure. [RT #1946]

CHANGES
lib/dns/masterdump.c

diff --git a/CHANGES b/CHANGES
index 04a877417f890b42d8eca010d4af3a771a3d7303..bdaf878063a34e2bc35595737602dcbdd1ae1715 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+1074.  [bug]           Running out of memory in dump_rdataset() could
+                       cause an assertion failure. [RT #1946]
+
 1057.  [bug]           Reloading the server after adding a "file" clause
                        to a zone statement could cause the server to
                        crash due to a typo in change 1016.
index 555abcb98814c5a07f9f20dbf0132e554a6c997a..82b08266c1d7b4bc6864a27671f801e1719165d3 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: masterdump.c,v 1.38.2.3 2001/03/07 23:33:18 bwelling Exp $ */
+/* $Id: masterdump.c,v 1.38.2.4 2001/10/30 01:56:13 marka Exp $ */
 
 #include <config.h>
 
@@ -616,11 +616,11 @@ dump_rdataset(isc_mem_t *mctx, dns_name_t *name, dns_rdataset_t *rdataset,
                if (result != ISC_R_NOSPACE)
                        break;
 
-               isc_mem_put(mctx, buffer->base, buffer->length);
                newlength = buffer->length * 2;
                newmem = isc_mem_get(mctx, newlength);
                if (newmem == NULL)
                        return (ISC_R_NOMEMORY);
+               isc_mem_put(mctx, buffer->base, buffer->length);
                isc_buffer_init(buffer, newmem, newlength);
        }
        if (result != ISC_R_SUCCESS)