From: Matthijs Mekking Date: Wed, 22 Feb 2023 11:12:15 +0000 (+0100) Subject: Require to be dereferenced arguments are non-NULL X-Git-Tag: v9.19.11~14^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6c76a99c24e43323d2982be9c49488d1f3760844;p=thirdparty%2Fbind9.git Require to be dereferenced arguments are non-NULL The function 'dns_dnssec_syncupdate()' is dereferencing arguments 'keys' and 'rmkeys'. There should be a REQUIRE that those are not null pointers. --- diff --git a/lib/dns/dnssec.c b/lib/dns/dnssec.c index a207da8b797..e038e220a1a 100644 --- a/lib/dns/dnssec.c +++ b/lib/dns/dnssec.c @@ -2033,6 +2033,8 @@ dns_dnssec_syncupdate(dns_dnsseckeylist_t *keys, dns_dnsseckeylist_t *rmkeys, dns_dnsseckey_t *key; REQUIRE(digests != NULL); + REQUIRE(keys != NULL); + REQUIRE(rmkeys != NULL); for (key = ISC_LIST_HEAD(*keys); key != NULL; key = ISC_LIST_NEXT(key, link)) diff --git a/lib/dns/include/dns/dnssec.h b/lib/dns/include/dns/dnssec.h index 17280fe5707..1e9e5765643 100644 --- a/lib/dns/include/dns/dnssec.h +++ b/lib/dns/include/dns/dnssec.h @@ -371,6 +371,8 @@ dns_dnssec_syncupdate(dns_dnsseckeylist_t *keys, dns_dnsseckeylist_t *rmkeys, * Any changes made also cause a dns_difftuple to be added to 'diff'. * * Requires: + *\li 'keys' is not NULL. + *\li 'rmkeys' is not NULL. *\li 'digests' is not NULL. * * Returns: