mirror of
https://github.com/intel/llvm.git
synced 2026-01-16 05:32:28 +08:00
[analyzer][docs] NFC: Extend documentation for MallocOverflow checker
Patch by Benics Balázs Differential Revision: https://reviews.llvm.org/D70596
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user