From 17cecc84cc0e9f7b1dc9991e2568d1f8f4fc2b08 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Wed, 10 Jan 2018 14:18:10 +0100 Subject: [PATCH] rec: Initialize the result var before calling the preoutquery hook If the `preoutquery` hook was defined but didn't handle the query, the resulting variable was left uninitialized. --- pdns/syncres.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdns/syncres.cc b/pdns/syncres.cc index f31621e023..9d4e3fa3c7 100644 --- a/pdns/syncres.cc +++ b/pdns/syncres.cc @@ -2352,7 +2352,7 @@ bool SyncRes::processRecords(const std::string& prefix, const DNSName& qname, co bool SyncRes::doResolveAtThisIP(const std::string& prefix, const DNSName& qname, const QType& qtype, LWResult& lwr, boost::optional& ednsmask, const DNSName& auth, bool const sendRDQuery, const DNSName& nsName, const ComboAddress& remoteIP, bool doTCP, bool* truncated) { - int resolveret; + int resolveret = RCode::NoError; s_outqueries++; d_outqueries++; -- 2.47.2