From: Mark Andrews Date: Mon, 25 Jan 2021 05:32:06 +0000 (+1100) Subject: Require 'ctx' to be non-NULL in cfg_acl_fromconfig{,2} X-Git-Tag: v9.17.10~17^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a8b55992a8ac3cf717d99b1dd05b7cb3ed841a5d;p=thirdparty%2Fbind9.git Require 'ctx' to be non-NULL in cfg_acl_fromconfig{,2} --- diff --git a/lib/isccfg/aclconf.c b/lib/isccfg/aclconf.c index e1ae89cdba8..f748199b744 100644 --- a/lib/isccfg/aclconf.c +++ b/lib/isccfg/aclconf.c @@ -643,6 +643,7 @@ cfg_acl_fromconfig2(const cfg_obj_t *caml, const cfg_obj_t *cctx, new_nest_level = nest_level - 1; } + REQUIRE(ctx != NULL); REQUIRE(target != NULL); REQUIRE(*target == NULL || DNS_ACL_VALID(*target)); diff --git a/lib/isccfg/include/isccfg/aclconf.h b/lib/isccfg/include/isccfg/aclconf.h index b2002c1762e..81e43129d8a 100644 --- a/lib/isccfg/include/isccfg/aclconf.h +++ b/lib/isccfg/include/isccfg/aclconf.h @@ -81,6 +81,10 @@ cfg_acl_fromconfig2(const cfg_obj_t *caml, const cfg_obj_t *cctx, * of a matching family (AF_INET or AF_INET6) may be configured. * * On success, attach '*target' to the new dns_acl_t object. + * + * Require: + * 'ctx' to be non NULL. + * '*target' to be NULL or a valid dns_acl_t. */ ISC_LANG_ENDDECLS