bind9/lib/ns
Michał Kępień a4547a1093 Check for NULL before dereferencing qctx->rpz_st
Commit 9ffb4a7ba1 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.

(cherry picked from commit 07592d1315)
2022-12-06 13:47:51 +00:00
..
include Only refresh RRset once 2022-09-08 11:50:44 +02:00
client.c Fix ns_statscounter_recursclients counting bug 2022-10-18 08:54:04 +00:00
hooks.c Update sources to Clang 15 formatting 2022-11-29 09:14:07 +01:00
interfacemgr.c Update sources to Clang 15 formatting 2022-11-29 09:14:07 +01:00
listenlist.c Update sources to Clang 15 formatting 2022-11-29 09:14:07 +01:00
log.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
Makefile.am Move all the unit tests to /tests/<libname>/ 2022-05-31 12:06:00 +02:00
notify.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
query.c Check for NULL before dereferencing qctx->rpz_st 2022-12-06 13:47:51 +00:00
server.c Store HTTP quota size inside a listenlist instead of the quota 2022-06-28 16:37:31 +03:00
sortlist.c De-duplicate __FILE__, __LINE__ 2022-10-17 16:00:26 +01:00
stats.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
tests Move all the unit tests to /tests/<libname>/ 2022-05-31 12:06:00 +02:00
update.c Update sources to Clang 15 formatting 2022-11-29 09:14:07 +01:00
xfrout.c Update sources to Clang 15 formatting 2022-11-29 09:14:07 +01:00