From f29760d2634442f5ff7fc1ad0b2cb2ce07348338 Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Mon, 9 Nov 2020 16:59:44 +0100 Subject: [PATCH] Do not access pbData members if pbData is boost::none, spotted by @rgacogne --- pdns/pdns_recursor.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pdns/pdns_recursor.cc b/pdns/pdns_recursor.cc index 905c4f0b51..d22c8e9843 100644 --- a/pdns/pdns_recursor.cc +++ b/pdns/pdns_recursor.cc @@ -2706,9 +2706,9 @@ static string* doProcessUDPQuestion(const std::string& question, const ComboAddr #ifdef HAVE_PROTOBUF if(t_protobufServers && logResponse && !(luaconfsLocal->protobufExportConfig.taggedOnly && pbData && !pbData->d_tagged)) { // XXX - pdns::ProtoZero::Message pbMessage(pbData->d_message, pbData->d_response, 64, 10); // The extra bytes we are going to add + pdns::ProtoZero::Message pbMessage(pbData ? pbData->d_message : "", pbData ? pbData->d_response : "", 64, 10); // The extra bytes we are going to add if (pbData) { - // We take the unmutable string from the cache an are appending a few values + // We take the inmutable string from the cache and are appending a few values } else { pbMessage.setType(2); // Response pbMessage.setServerIdentity(SyncRes::s_serverID); -- 2.47.2