[clang] [clang][StaticAnalyzer] Adding getentropy to CStringChecker. (PR #83675)

Balazs Benics via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 8 05:07:57 PST 2024


================
@@ -165,6 +165,8 @@ class CStringChecker : public Checker< eval::Call,
       {{CDM::CLibrary, {"explicit_bzero"}, 2}, &CStringChecker::evalBzero},
       {{CDM::CLibrary, {"sprintf"}, 2}, &CStringChecker::evalSprintf},
       {{CDM::CLibrary, {"snprintf"}, 2}, &CStringChecker::evalSnprintf},
+      {{CDM::CLibrary, {"getentropy"}, 2},
+       std::bind(&CStringChecker::evalGetentropy, _1, _2, _3, CK_Regular)},
----------------
steakhal wrote:

```suggestion
      {{CDM::CLibrary, {"getentropy"}, 2}, CStringChecker::evalGetentropy},
```

https://github.com/llvm/llvm-project/pull/83675


More information about the cfe-commits mailing list