From cabaeca9ae5b98c80586b91e89cf552e17a75a9b Mon Sep 17 00:00:00 2001 From: Brian Wellington Date: Mon, 16 Jul 2001 09:48:05 +0000 Subject: [PATCH] missing assertion checks --- lib/dns/rdata.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/dns/rdata.c b/lib/dns/rdata.c index 926c97f515..f3fdd2d19b 100644 --- a/lib/dns/rdata.c +++ b/lib/dns/rdata.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: rdata.c,v 1.145 2001/07/16 03:05:57 marka Exp $ */ +/* $Id: rdata.c,v 1.146 2001/07/16 09:48:05 bwelling Exp $ */ #include #include @@ -379,6 +379,8 @@ dns_rdata_init(dns_rdata_t *rdata) { void dns_rdata_reset(dns_rdata_t *rdata) { + REQUIRE(rdata != NULL); + REQUIRE(!ISC_LINK_LINKED(rdata, link)); REQUIRE(DNS_RDATA_VALIDFLAGS(rdata)); @@ -396,6 +398,9 @@ dns_rdata_reset(dns_rdata_t *rdata) { void dns_rdata_clone(const dns_rdata_t *src, dns_rdata_t *target) { + REQUIRE(src != NULL); + REQUIRE(target != NULL); + REQUIRE(DNS_RDATA_INITIALIZED(target)); REQUIRE(DNS_RDATA_VALIDFLAGS(src));