From: Brian Wellington Date: Tue, 26 Sep 2000 21:40:57 +0000 (+0000) Subject: 491. [bug] nsupdate would segfault when sending certain X-Git-Tag: v9.0.0^2~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=696560604aabdbe9c3e459430bf5158ac2e67347;p=thirdparty%2Fbind9.git 491. [bug] nsupdate would segfault when sending certain prerequisites with empty RDATA. [RT #356] --- diff --git a/CHANGES b/CHANGES index 914672fd733..552749a6d92 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ + 491. [bug] nsupdate would segfault when sending certain + prerequisites with empty RDATA. [RT #356] + 488. [bug] Locks weren't properly destroyed in some cases. 476. [bug] A zone could expire while a zone transfer was in diff --git a/lib/dns/rdata.c b/lib/dns/rdata.c index 417a1caae63..23f244ca84e 100644 --- a/lib/dns/rdata.c +++ b/lib/dns/rdata.c @@ -15,7 +15,7 @@ * SOFTWARE. */ -/* $Id: rdata.c,v 1.101.2.3 2000/09/19 02:02:23 bwelling Exp $ */ +/* $Id: rdata.c,v 1.101.2.4 2000/09/26 21:40:55 bwelling Exp $ */ #include #include @@ -443,6 +443,12 @@ dns_rdata_towire(dns_rdata_t *rdata, dns_compress_t *cctx, REQUIRE(rdata != NULL); + /* + * Some DynDNS meta-RRs have empty rdata. + */ + if (rdata->length == 0) + return (ISC_R_SUCCESS); + st = *target; TOWIRESWITCH