]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
rec: fix Coverity issues in new RPZ code 13741/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 24 Jan 2024 09:04:49 +0000 (10:04 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 24 Jan 2024 10:58:24 +0000 (11:58 +0100)
Coverity issues 1533681..1533686, all low impact perf related

pdns/recursordist/rec-lua-conf.cc
pdns/recursordist/rpzloader.cc

index 615f8b9621ceb0d2854f2df5a4f01f08a3ae792b..e862da35f90443e4892c60f86c0562f594eb34f2 100644 (file)
@@ -387,7 +387,7 @@ static void rpzPrimary(LuaConfigItems& lci, luaConfigDelayedThreads& delayedThre
          lci.d_slog->error(Logr::Error, e.reason, "Exception configuring 'rpzPrimary'", Logging::Loggable("PDNSException")));
   }
 
-  delayedThreads.rpzPrimaryThreads.emplace_back(RPZTrackerParams{primaries, defpol, defpolOverrideLocal, maxTTL, zoneIdx, tt, maxReceivedXFRMBytes, localAddress, axfrTimeout, refresh, sr, dumpFile});
+  delayedThreads.rpzPrimaryThreads.emplace_back(RPZTrackerParams{std::move(primaries), std::move(defpol), defpolOverrideLocal, maxTTL, zoneIdx, std::move(tt), maxReceivedXFRMBytes, localAddress, axfrTimeout, refresh, std::move(sr), std::move(dumpFile)});
 }
 
 // A wrapper class that loads the standard Lua defintions into the context, so that we can use things like pdns.A
index 5eb5f315d7c7eecbc4cf23b14ea6c939dec596da..33c9ae27a5ec7bb4debc97c90f47afb83bf1cb43 100644 (file)
@@ -671,6 +671,7 @@ bool notifyRPZTracker(const DNSName& name)
   return true;
 }
 
+// coverity[pass_by_value] params is intended to be a copy, as this is the main function of a thread
 void RPZIXFRTracker(RPZTrackerParams params, uint64_t configGeneration)
 {
   setThreadName("rec/rpzixfr");