From: Michal Nowak Date: Mon, 29 Jun 2026 11:41:37 +0000 (+0000) Subject: Assert rpz_ready() yields an rdataset in rpz_find_p() X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=2263ea2a0cba755ef11bdf7a4e7d75ad301ed2ac;p=thirdparty%2Fbind9.git Assert rpz_ready() yields an rdataset in rpz_find_p() A successful rpz_ready() always leaves *rdatasetp non-NULL. Assert it to silence a scan-build false positive: lib/ns/query.c:3136:7: warning: Access to field 'type' results in a dereference of a null pointer [core.NullDereference] Assisted-by: Claude:claude-opus-4-8 --- diff --git a/lib/ns/query.c b/lib/ns/query.c index 0b14141b5c3..26c81d4f029 100644 --- a/lib/ns/query.c +++ b/lib/ns/query.c @@ -3003,6 +3003,7 @@ rpz_find_p(ns_client_t *client, dns_name_t *self_name, dns_rdatatype_t qtype, CTRACE(ISC_LOG_ERROR, "rpz_ready() failed"); return DNS_R_SERVFAIL; } + INSIST(*rdatasetp != NULL); *versionp = NULL; result = rpz_getdb(client, p_name, rpz_type, zonep, dbp, versionp); if (result != ISC_R_SUCCESS) {