From 189bb10c774eae90f5021607063def99b0a7511c Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Tue, 14 Mar 2023 01:39:45 +0100 Subject: [PATCH] dnsdist: Use toLogString for the qname to prevent an error if it's empty --- pdns/dnsdistdist/doh.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdns/dnsdistdist/doh.cc b/pdns/dnsdistdist/doh.cc index ed29758b8f..657fdf9272 100644 --- a/pdns/dnsdistdist/doh.cc +++ b/pdns/dnsdistdist/doh.cc @@ -771,7 +771,7 @@ static void processDOHQuery(DOHUnitUniquePtr&& du) throw; } - vinfolog("Got query for %s|%s from %s (https), relayed to %s", ids->qname.toString(), QType(ids->qtype).toString(), remote.toStringWithPort(), du->downstream->getName()); + vinfolog("Got query for %s|%s from %s (https), relayed to %s", ids->qname.toLogString(), QType(ids->qtype).toString(), remote.toStringWithPort(), du->downstream->getName()); } catch (const std::exception& e) { vinfolog("Got an error in DOH question thread while parsing a query from %s, id %d: %s", remote.toStringWithPort(), queryId, e.what()); -- 2.47.2