From: Remi Gacogne Date: Tue, 19 May 2026 08:29:49 +0000 (+0200) Subject: credentials: Document that we trying to get the linters to shut the hell up X-Git-Tag: auth-5.1.0~37^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e7fa1c3af2916c4dce3199bef9a536feaf996209;p=thirdparty%2Fpdns.git credentials: Document that we trying to get the linters to shut the hell up Signed-off-by: Remi Gacogne --- diff --git a/pdns/credentials.cc b/pdns/credentials.cc index c91873c205..c82056288d 100644 --- a/pdns/credentials.cc +++ b/pdns/credentials.cc @@ -84,9 +84,11 @@ void SensitiveData::reallyClearContent(void* data, size_t size) noexcept SensitiveData::SensitiveData(std::string&& data) : d_data(std::move(data)) { + // linters are complaining that we are calling data() and capacity() on a moved-from object, + // so clear the object first so they shut up data.clear(); #ifdef HAVE_LIBSODIUM - // let's be nice and try to zero out the SSO buffer + // let's be nice and try to zero out the SSO buffer, that cannot be moved reallyClearContent(data.data(), data.capacity()); #endif #ifdef HAVE_LIBSODIUM