[clang] [analyzer] Removing untrusted buffer size taint warning (PR #68607)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 30 08:49:30 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff e50a857fb16bcfe7cfc99bf87db620bc82d1cff5 5d7c44a7e4b338f83f791ebc6ec3297d62983c0b -- clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp clang/test/Analysis/taint-diagnostic-visitor.c clang/test/Analysis/taint-generic.c
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp
index ccd56da2ee..d17f5ddf07 100644
--- a/clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp
@@ -754,8 +754,7 @@ void GenericTaintChecker::initTaintRules(CheckerContext &C) const {
// sophisticated sanitation heuristics.
{{{{"setproctitle"}}}, TR::Sink({{0}, 1}, MsgUncontrolledFormatString)},
{{{{"setproctitle_fast"}}},
- TR::Sink({{0}, 1}, MsgUncontrolledFormatString)}
- };
+ TR::Sink({{0}, 1}, MsgUncontrolledFormatString)}};
// `getenv` returns taint only in untrusted environments.
if (TR::UntrustedEnv(C)) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/68607
More information about the cfe-commits
mailing list