From 5385947ef76fa53941838ac01e2f602ef9df8832 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. (cherry picked from commit 17cecc84cc0e9f7b1dc9991e2568d1f8f4fc2b08) --- pdns/syncres.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdns/syncres.cc b/pdns/syncres.cc index 3738396ae2..2b4e12028f 100644 --- a/pdns/syncres.cc +++ b/pdns/syncres.cc @@ -2330,7 +2330,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