]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Add DBC checks to named_checknames_get
authorMark Andrews <marka@isc.org>
Wed, 20 May 2020 01:56:37 +0000 (11:56 +1000)
committerMark Andrews <marka@isc.org>
Mon, 25 May 2020 01:52:17 +0000 (11:52 +1000)
(cherry picked from commit 20c07da49ba86d61288c97e57174e9bd6e0d907a)

bin/named/config.c

index 040b9be13035de99f0826ade6441a26da77d4afd..862f3e5025121ae63cc0086a32575d03376f351f 100644 (file)
@@ -351,6 +351,10 @@ named_checknames_get(const cfg_obj_t **maps, const char *which,
        const cfg_obj_t *value;
        int i;
 
+       REQUIRE(maps != NULL);
+       REQUIRE(which != NULL);
+       REQUIRE(obj != NULL && *obj == NULL);
+
        for (i = 0;; i++) {
                if (maps[i] == NULL) {
                        return (ISC_R_NOTFOUND);