Size of the variable-length array (VLA) is from an unsecure source and might be zero, negative, or too large
This defect occurs when the size of a variable length array (VLA) is obtained from an unsecure
source. To consider all input from outside the current analysis
perimeter as unsecure, use -consider-analysis-perimeter-as-trust-boundary.
If an attacker changed the size of your VLA to an unexpected value, it can cause your program to crash or behave unexpectedly.
If the size is non-positive, the behavior of the VLA is undefined. Your program does not perform as expected.
If the size is unbounded, the VLA can cause memory exhaustion or stack overflow.
Validate your VLA size to make sure that it is positive and less than a maximum value.
| Group: Tainted Data |
| Language: C | C++ |
| Default: Off |
Command-Line Syntax: TAINTED_VLA_SIZE |
| Impact: Medium |
| CWE ID: 128, 131, 770, 789 |
-consider-analysis-perimeter-as-trust-boundary | Find defects (-checkers) | Memory allocation with tainted size