mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-28 21:17:54 +00:00
Commit 9ffb4a7ba11fae64a6ce2dd6390cd334372b7ab7 causes Clang Static Analyzer to flag a potential NULL dereference in query_nxdomain(): query.c:9394:26: warning: Dereference of null pointer [core.NullDereference] if (!qctx->nxrewrite || qctx->rpz_st->m.rpz->addsoa) { ^~~~~~~~~~~~~~~~~~~ 1 warning generated. The warning above is for qctx->rpz_st potentially being a NULL pointer when query_nxdomain() is called from query_resume(). This is a false positive because none of the database lookup result codes currently causing query_nxdomain() to be called (DNS_R_EMPTYWILD, DNS_R_NXDOMAIN) can be returned by a database lookup following a recursive resolution attempt. Add a NULL check nevertheless in order to future-proof the code and silence Clang Static Analyzer.