From: Mark Andrews Date: Sun, 26 Jun 2016 07:23:58 +0000 (+1000) Subject: fix null pointer comparisons X-Git-Tag: v9.11.0b1~13 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=980c504b306414cb536ef825fc78e9fd08859f36;p=thirdparty%2Fbind9.git fix null pointer comparisons --- diff --git a/lib/dns/catz.c b/lib/dns/catz.c index e1ba568c724..e547cb1e131 100644 --- a/lib/dns/catz.c +++ b/lib/dns/catz.c @@ -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,