projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
46883f4
)
[analyzer][docs] NFC: Extend documentation for MallocOverflow checker
author
Borsik Gabor
<gabor.borsik@gmail.com>
Sat, 23 Nov 2019 19:55:19 +0000
(20:55 +0100)
committer
Borsik Gabor
<gabor.borsik@gmail.com>
Sat, 23 Nov 2019 19:55:19 +0000
(20:55 +0100)
Patch by Benics Balázs
Differential Revision: https://reviews.llvm.org/D70596
clang/docs/analyzer/checkers.rst
patch
|
blob
|
history
diff --git
a/clang/docs/analyzer/checkers.rst
b/clang/docs/analyzer/checkers.rst
index a751b14809752945fa0fda2e60efac6b6403b9e8..b410c085878936f977382f13a8978d86b65860c3 100644
(file)
--- a/
clang/docs/analyzer/checkers.rst
+++ b/
clang/docs/analyzer/checkers.rst
@@
-1974,6
+1974,12
@@
Check for overflows in the arguments to malloc().
void *p = malloc(n * sizeof(int)); // warn
}
+ void test2(int n) {
+ if (n > 100) // gives an upper-bound
+ return;
+ void *p = malloc(n * sizeof(int)); // no warning
+ }
+
.. _alpha-security-MmapWriteExec:
alpha.security.MmapWriteExec (C)