[PATCH] D71524: [analyzer] Support tainted objects in GenericTaintChecker

Borsik Gábor via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Sep 20 13:44:53 PDT 2020


boga95 marked 9 inline comments as done.
boga95 added a comment.

Ping



================
Comment at: clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp:289-293
+      {"c_str", {"std::__cxx11::basic_string", {{0}, {ReturnValueIndex}}}},
+      {"data", {"std::__cxx11::basic_string", {{0}, {ReturnValueIndex}}}},
+      {"size", {"std::__cxx11::basic_string", {{0}, {ReturnValueIndex}}}},
+      {"length", {"std::__cxx11::basic_string", {{0}, {ReturnValueIndex}}}},
+      {"getline", {"std::", {{0}, {1, ReturnValueIndex}}}}};
----------------
NoQ wrote:
> Szelethus wrote:
> > Hmm, is this the appropriate place to put these? It seems like this job is handled in `getTaintPropagationRule`. I thought `CustomPropagations` are reserved for the config file.
> So `0` stands for `this`? Can we have a named constant please? ^.^
We are planning to move all of the propagation rules into a configuration file.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71524/new/

https://reviews.llvm.org/D71524



More information about the cfe-commits mailing list