summaryrefslogtreecommitdiffstats
path: root/clang/www/analyzer
diff options
context:
space:
mode:
authorArtem Dergachev <artem.dergachev@gmail.com>2018-05-26 00:04:26 +0000
committerArtem Dergachev <artem.dergachev@gmail.com>2018-05-26 00:04:26 +0000
commit8419cf307eeb9d44f686da280fdb789ba0d0506d (patch)
treebfd9e5276e4ee812c481e14310a22a1d2824e952 /clang/www/analyzer
parent1be7517aa9d860461cd986a85ef659d43d1d74b6 (diff)
downloadbcm5719-llvm-8419cf307eeb9d44f686da280fdb789ba0d0506d.tar.gz
bcm5719-llvm-8419cf307eeb9d44f686da280fdb789ba0d0506d.zip
[analyzer] Add security checks for bcmp(), bcopy(), bzero().
These functions are obsolete. The analyzer would advice to replace them with memcmp(), memcpy() or memmove(), or memset(). Patch by Tom Rix! Differential Revision: https://reviews.llvm.org/D41881 llvm-svn: 333326
Diffstat (limited to 'clang/www/analyzer')
-rw-r--r--clang/www/analyzer/available_checks.html34
1 files changed, 34 insertions, 0 deletions
diff --git a/clang/www/analyzer/available_checks.html b/clang/www/analyzer/available_checks.html
index b9c7846aa23..f764e0a1978 100644
--- a/clang/www/analyzer/available_checks.html
+++ b/clang/www/analyzer/available_checks.html
@@ -1173,6 +1173,40 @@ void test() {
<tr><td><div class="namedescr expandable"><span class="name">
+security.insecureAPI.bcmp</span><span class="lang">
+(C)</span><div class="descr">
+Warn on uses of the <code>bcmp</code> function.</div></div></td>
+<td><div class="exampleContainer expandable">
+<div class="example"><pre>
+void test() {
+ bcmp(ptr0, ptr1, n); // warn
+}
+</pre></div></div></td></tr>
+
+<tr><td><div class="namedescr expandable"><span class="name">
+security.insecureAPI.bcopy</span><span class="lang">
+(C)</span><div class="descr">
+Warn on uses of the <code>bcopy</code> function.</div></div></td>
+<td><div class="exampleContainer expandable">
+<div class="example"><pre>
+void test() {
+ bcopy(src, dst, n); // warn
+}
+</pre></div></div></td></tr>
+
+<tr><td><div class="namedescr expandable"><span class="name">
+security.insecureAPI.bzero</span><span class="lang">
+(C)</span><div class="descr">
+Warn on uses of the <code>bzero</code> function.</div></div></td>
+<td><div class="exampleContainer expandable">
+<div class="example"><pre>
+void test() {
+ bzero(ptr, n); // warn
+}
+</pre></div></div></td></tr>
+
+
+<tr><td><div class="namedescr expandable"><span class="name">
security.insecureAPI.getpw</span><span class="lang">
(C)</span><div class="descr">
Warn on uses of the <code>getpw</code> function.</div></div></td>
OpenPOWER on IntegriCloud