]> 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:56:15 +0000 (11:56 +1000)
(cherry picked from commit 20c07da49ba86d61288c97e57174e9bd6e0d907a)

bin/named/config.c

index 53a60d7a35e6948afc15139bc67d4be246255006..ede6af20c1f64e7a138f684f6dee8483c93477d2 100644 (file)
@@ -344,6 +344,10 @@ ns_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);