From: Otto Moerbeek Date: Wed, 24 Jan 2024 09:04:49 +0000 (+0100) Subject: rec: fix Coverity issues in new RPZ code X-Git-Tag: dnsdist-1.9.0-rc1~4^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e4db68c968d9faef33649afb21413601d3e376f;p=thirdparty%2Fpdns.git rec: fix Coverity issues in new RPZ code Coverity issues 1533681..1533686, all low impact perf related --- diff --git a/pdns/recursordist/rec-lua-conf.cc b/pdns/recursordist/rec-lua-conf.cc index 615f8b9621..e862da35f9 100644 --- a/pdns/recursordist/rec-lua-conf.cc +++ b/pdns/recursordist/rec-lua-conf.cc @@ -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 diff --git a/pdns/recursordist/rpzloader.cc b/pdns/recursordist/rpzloader.cc index 5eb5f315d7..33c9ae27a5 100644 --- a/pdns/recursordist/rpzloader.cc +++ b/pdns/recursordist/rpzloader.cc @@ -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");