]> granicus.if.org Git - pdns/commitdiff
rec: Initialize the result var before calling the preoutquery hook
authorRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 10 Jan 2018 13:18:10 +0000 (14:18 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 10 Jan 2018 13:35:04 +0000 (14:35 +0100)
If the `preoutquery` hook was defined but didn't handle the query,
the resulting variable was left uninitialized.

pdns/syncres.cc

index f31621e023dedd91eafaefdb81943e92231f39ba..9d4e3fa3c71ffaedc3163918a5e63bdf5c20aaeb 100644 (file)
@@ -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<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++;