]> granicus.if.org Git - pdns/commitdiff
rec: Explicitely mark protobuf messages as uninitialized
authorRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 6 Apr 2018 14:00:47 +0000 (16:00 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 6 Apr 2018 14:00:47 +0000 (16:00 +0200)
pdns/pdns_recursor.cc

index a89a758c0f89256742da4990f175eb004900332c..93c566e6bbded4cc6860f5fae367d1d6bb513ec0 100644 (file)
@@ -813,7 +813,7 @@ static void startDoResolve(void *p)
     auto luaconfsLocal = g_luaconfs.getLocal();
     // Used to tell syncres later on if we should apply NSDNAME and NSIP RPZ triggers for this query
     bool wantsRPZ(true);
-    boost::optional<RecProtoBufMessage> pbMessage;
+    boost::optional<RecProtoBufMessage> pbMessage(boost::none);
 #ifdef HAVE_PROTOBUF
     if (luaconfsLocal->protobufServer) {
       Netmask requestorNM(dc->d_source, dc->d_source.sin4.sin_family == AF_INET ? luaconfsLocal->protobufMaskV4 : luaconfsLocal->protobufMaskV6);
@@ -1794,7 +1794,7 @@ static string* doProcessUDPQuestion(const std::string& question, const ComboAddr
     }
 
     bool cacheHit = false;
-    boost::optional<RecProtoBufMessage> pbMessage = boost::none;
+    boost::optional<RecProtoBufMessage> pbMessage(boost::none);
 #ifdef HAVE_PROTOBUF
     if(luaconfsLocal->protobufServer) {
       pbMessage = RecProtoBufMessage(DNSProtoBufMessage::DNSProtoBufMessageType::Response);