From bcb4b8080c496517dd9495c9061f50887cf440bf Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Mon, 16 Oct 2023 11:06:20 +0200 Subject: [PATCH] Check if nrr pointer is valid before using Co-authored-by: Remi Gacogne --- pdns/recursordist/syncres.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdns/recursordist/syncres.cc b/pdns/recursordist/syncres.cc index f7c56a4e21..79eed8d6af 100644 --- a/pdns/recursordist/syncres.cc +++ b/pdns/recursordist/syncres.cc @@ -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()); -- 2.47.2