...
Code Block | ||
---|---|---|
| ||
#define MAX_ARRAY 1024 void func(size_t s) { int vla[s]; ... } ... if (s < MAX_ARRAY && s != 0) { func(s); } else { /* Handle Error */ } ... |
Implementation Details
Variable length arrays are not supported by Microsoft compilers do not support variable length arrays.
Risk Assessment
Failure to properly specify the size of a variable length array may allow arbitrary code execution.
...