]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Check if nrr pointer is valid before using 13364/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 16 Oct 2023 09:06:20 +0000 (11:06 +0200)
committerGitHub <noreply@github.com>
Mon, 16 Oct 2023 09:06:20 +0000 (11:06 +0200)
Co-authored-by: Remi Gacogne <github@coredump.fr>
pdns/recursordist/syncres.cc

index f7c56a4e21e5432b264d3096a31a976b2b0056ea..79eed8d6afd24b4fad4f90bb26644aedc5bc70ad 100644 (file)
@@ -2289,7 +2289,7 @@ void SyncRes::getBestNSFromCache(const DNSName& qname, const QType qtype, vector
               LOG(", not in cache / did not look at cache" << endl);
             }
           }
-          else {
+          else if (nrr != nullptr) {
             *flawedNSSet = true;
             LOG(prefix << qname << ": NS in cache for '" << subdomain << "', but needs glue (" << nrr->getNS() << ") which we miss or is expired" << endl);
             missing.emplace_back(nrr->getNS());