]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Do not access pbData members if pbData is boost::none, spotted by @rgacogne 9630/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 9 Nov 2020 15:59:44 +0000 (16:59 +0100)
committerOtto Moerbeek <otto@drijf.net>
Tue, 10 Nov 2020 08:17:13 +0000 (09:17 +0100)
pdns/pdns_recursor.cc

index 905c4f0b5198a6590dee140ead381317295367fa..d22c8e9843ad6311c419aa58586af6da95405221 100644 (file)
@@ -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);