]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
fix null pointer comparisons
authorMark Andrews <marka@isc.org>
Sun, 26 Jun 2016 07:23:58 +0000 (17:23 +1000)
committerMark Andrews <marka@isc.org>
Sun, 26 Jun 2016 07:23:58 +0000 (17:23 +1000)
lib/dns/catz.c

index e1ba568c724ac26de555e6203b390310c8aba5f7..e547cb1e13195da9ad93c15ed9f984ca08e7d4c4 100644 (file)
@@ -1041,7 +1041,7 @@ catz_process_masters(dns_catz_zone_t *zone, dns_ipkeylist_t *ipkl,
                 * no optimization.
                 */
                for (i = 0; i < ipkl->count; i++) {
-                       if (ipkl->labels != NULL &&
+                       if (ipkl->labels[i] != NULL &&
                            !dns_name_compare(name, ipkl->labels[i]))
                                break;
                }
@@ -1060,7 +1060,7 @@ catz_process_masters(dns_catz_zone_t *zone, dns_ipkeylist_t *ipkl,
                        }
 
                        ipkl->labels[i] = isc_mem_get(mctx, sizeof(dns_name_t));
-                       if (ipkl->labels == NULL)  {
+                       if (ipkl->labels[i] == NULL)  {
                                if (keyname != NULL) {
                                        dns_name_free(keyname, mctx);
                                        isc_mem_put(mctx, keyname,