[Libreoffice-commits] core.git: include/o3tl
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Thu Mar 25 19:39:58 UTC 2021
include/o3tl/safeint.hxx | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
New commits:
commit f8965272055bf9e7f3a26ff9f729d88ee856b592
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Mar 25 16:33:16 2021 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Mar 25 20:39:19 2021 +0100
cid#1474353 experiment to silence Untrusted loop bound
Change-Id: I4436427109c92a28890a1bc7f669841c40ec2020
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113101
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/include/o3tl/safeint.hxx b/include/o3tl/safeint.hxx
index 71239d59c718..c2610edacec6 100644
--- a/include/o3tl/safeint.hxx
+++ b/include/o3tl/safeint.hxx
@@ -239,18 +239,11 @@ make_unsigned(T value)
// tools like -fsanitize=implicit-conversion should still be able to detect truncation:
template<typename T1, typename T2> constexpr T1 narrowing(T2 value) { return value; }
-// std::min wrapped to inform coverity that the result is now sanitized
-#if defined(__COVERITY__)
-extern "C" void __coverity_tainted_data_sanitize__(void *);
-#endif
-
+// std::min wrapped to inform coverity that the result is now deemed sanitized
+// coverity[ -taint_source ]
template<typename T> inline T sanitizing_min(T a, T b)
{
- T ret = std::min(a, b);
-#if defined(__COVERITY__)
- __coverity_tainted_data_sanitize__(&ret);
-#endif
- return ret;
+ return std::min(a, b);
}
}
More information about the Libreoffice-commits
mailing list