]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
rec: Initialize the result var before calling the preoutquery hook 6202/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 10 Jan 2018 13:18:10 +0000 (14:18 +0100)
committeraerique <aerique@xs4all.nl>
Wed, 17 Jan 2018 09:25:15 +0000 (10:25 +0100)
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

index 3738396ae25ae14bc3b2f52c95b6ef8952c3529b..2b4e12028ff9e94399488ebcaf2437de90956914 100644 (file)
@@ -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<Netmask>& 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++;