From 1fbc6dc5612af5687549b53e10f68831a97f00fa Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Fri, 6 Apr 2018 16:00:47 +0200 Subject: [PATCH] rec: Explicitely mark protobuf messages as uninitialized --- 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 a89a758c0f..93c566e6bb 100644 --- a/pdns/pdns_recursor.cc +++ b/pdns/pdns_recursor.cc @@ -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 pbMessage; + boost::optional 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 pbMessage = boost::none; + boost::optional pbMessage(boost::none); #ifdef HAVE_PROTOBUF if(luaconfsLocal->protobufServer) { pbMessage = RecProtoBufMessage(DNSProtoBufMessage::DNSProtoBufMessageType::Response); -- 2.47.2