From: Remi Gacogne Date: Tue, 14 Mar 2023 00:39:45 +0000 (+0100) Subject: dnsdist: Use toLogString for the qname to prevent an error if it's empty X-Git-Tag: dnsdist-1.7.4~1^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F12646%2Fhead;p=thirdparty%2Fpdns.git dnsdist: Use toLogString for the qname to prevent an error if it's empty --- 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());