From: Otto Moerbeek Date: Mon, 9 Nov 2020 15:59:44 +0000 (+0100) Subject: Do not access pbData members if pbData is boost::none, spotted by @rgacogne X-Git-Tag: dnsdist-1.6.0-alpha0~11^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F9630%2Fhead;p=thirdparty%2Fpdns.git Do not access pbData members if pbData is boost::none, spotted by @rgacogne --- 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);