From: Mark Andrews Date: Tue, 18 May 2021 05:19:28 +0000 (+1000) Subject: Silence gcc-10-fanalyzer false positive X-Git-Tag: v9.17.14~51^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=683ad6e4bd12315ace3703d56ba0f0a3b1ad660f;p=thirdparty%2Fbind9.git Silence gcc-10-fanalyzer false positive Add REQUIRE(type == dns_rdatatype_nsec3 || firstp != NULL); so that dereferences of *firstp is not flagged as a NULL pointer dereference. --- diff --git a/lib/dns/rbtdb.c b/lib/dns/rbtdb.c index 0e4872d1bce..874afd7a41f 100644 --- a/lib/dns/rbtdb.c +++ b/lib/dns/rbtdb.c @@ -3697,6 +3697,7 @@ previous_closest_nsec(dns_rdatatype_t type, rbtdb_search_t *search, isc_result_t result; REQUIRE(nodep != NULL && *nodep == NULL); + REQUIRE(type == dns_rdatatype_nsec3 || firstp != NULL); if (type == dns_rdatatype_nsec3) { result = dns_rbtnodechain_prev(&search->chain, NULL, NULL);