From 0180ccf72c79b98eb8ee5abbb7331aec6951dd9f Mon Sep 17 00:00:00 2001 From: Bob Halley Date: Thu, 1 Apr 1999 04:01:30 +0000 Subject: [PATCH] require non-NULL methods on accessors --- lib/dns/rdataset.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/dns/rdataset.c b/lib/dns/rdataset.c index 4ef8ac9f33..3f96f6f815 100644 --- a/lib/dns/rdataset.c +++ b/lib/dns/rdataset.c @@ -80,6 +80,7 @@ dns_rdataset_disassociate(dns_rdataset_t *rdataset) { */ REQUIRE(DNS_RDATASET_VALID(rdataset)); + REQUIRE(rdataset->methods != NULL); (rdataset->methods->disassociate)(rdataset); rdataset->methods = NULL; @@ -102,6 +103,7 @@ dns_rdataset_first(dns_rdataset_t *rdataset) { */ REQUIRE(DNS_RDATASET_VALID(rdataset)); + REQUIRE(rdataset->methods != NULL); return ((rdataset->methods->first)(rdataset)); } @@ -114,6 +116,7 @@ dns_rdataset_next(dns_rdataset_t *rdataset) { */ REQUIRE(DNS_RDATASET_VALID(rdataset)); + REQUIRE(rdataset->methods != NULL); return ((rdataset->methods->next)(rdataset)); } @@ -126,6 +129,7 @@ dns_rdataset_current(dns_rdataset_t *rdataset, dns_rdata_t *rdata) { */ REQUIRE(DNS_RDATASET_VALID(rdataset)); + REQUIRE(rdataset->methods != NULL); (rdataset->methods->current)(rdataset, rdata); }