]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Require to be dereferenced arguments are non-NULL
authorMatthijs Mekking <matthijs@isc.org>
Wed, 22 Feb 2023 11:12:15 +0000 (12:12 +0100)
committerMatthijs Mekking <matthijs@isc.org>
Tue, 28 Feb 2023 08:38:31 +0000 (09:38 +0100)
The function 'dns_dnssec_syncupdate()' is dereferencing arguments
'keys' and 'rmkeys'. There should be a REQUIRE that those are not
null pointers.

lib/dns/dnssec.c
lib/dns/include/dns/dnssec.h

index a207da8b797d0f863fd517e4c4121dbff1725e21..e038e220a1a35e3e152a86637a7b8c6476bccc2e 100644 (file)
@@ -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))
index 17280fe570734c159a1f571d942fa93f72a915b1..1e9e5765643ca05504199983cfe763710f165287 100644 (file)
@@ -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: