...
If a function modifies a pointed-to value, declaring this value as const will be caught by the compiler.
| Code Block | ||
|---|---|---|
| ||
void foo(const int * x) {
if (x != NULL) {
*x = 3; /* generates compiler warning */
}
/* ... */
}
|
...
Recommendation | Severity | Likelihood | Remediation Cost | Priority | Level | EXP10-A | 1 (medium) | 1 (unlikely) | 2 (high) | P2 | L3
|---|
Related Vulnerabilities
Search for vulnerabilities resulting from the violation of this rule on the CERT website.
...