]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
pullup: v9.1.0b2
authorAndreas Gustafsson <source@isc.org>
Thu, 28 Dec 2000 18:46:46 +0000 (18:46 +0000)
committerAndreas Gustafsson <source@isc.org>
Thu, 28 Dec 2000 18:46:46 +0000 (18:46 +0000)
 641.   [bug]            caused a uninitialized link to be used.
                        [RT #595]

CHANGES
lib/dns/master.c

diff --git a/CHANGES b/CHANGES
index 0530de87c30bdda1b24c04656513aef89b0b7998..294f008e4ebca95ddbb64cdd02a8413094b02ec3 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
 
        --- 9.1.0b2 released ---
 
+ 641.  [bug]           $GENERATE caused a uninitialized link to be used.
+                       [RT #595]
+
  640.  [bug]           Memory leak in error path could cause
                        "mpctx->allocated == 0" failure. [RT #584]
 
index b89d1c697e6af0c6e5aea5c22f29df8604cdd2d3..55528d043654062ce67646dfe8a7dcf8992ff2b8 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: master.c,v 1.88 2000/12/19 01:32:41 marka Exp $ */
+/* $Id: master.c,v 1.88.2.1 2000/12/28 18:46:46 gson Exp $ */
 
 #include <config.h>
 
@@ -612,6 +612,8 @@ generate(dns_loadctx_t *ctx, char *range, char *lhs, char *gtype, char *rhs) {
                goto error_cleanup;
        }
 
+       ISC_LIST_INIT(rdatalist.rdata);
+       ISC_LINK_INIT(&rdatalist, link);
        for (i = start; i < stop; i += step) {
                result = genname(lhs, i, lhsbuf, DNS_MASTER_BUFSZ);
                if (result != ISC_R_SUCCESS)
@@ -648,7 +650,6 @@ generate(dns_loadctx_t *ctx, char *range, char *lhs, char *gtype, char *rhs) {
                rdatalist.covers = 0;
                rdatalist.rdclass = ctx->zclass;
                rdatalist.ttl = ctx->ttl;
-               ISC_LIST_INIT(rdatalist.rdata);
                ISC_LIST_PREPEND(head, &rdatalist, link);
                ISC_LIST_APPEND(rdatalist.rdata, &rdata, link);
                result = commit(callbacks, ctx->lex, &head, owner,