...
Failing to const
-qualify immutable objects can result in a constant being modified at runtime.
Recommendation | Severity | Likelihood | Remediation Cost | Priority | Level |
---|---|---|---|---|---|
DCL00-C | Low | Unlikely | High | P1 | L3 |
Automated Detection
Tool | Version | Checker | Description | ||||||
---|---|---|---|---|---|---|---|---|---|
Astrée |
| parameter-missing-const | Partially checked | ||||||
CodeSonar |
| LANG.CAST.PC.CRCQ | Cast removes const qualifier | ||||||
Compass/ROSE |
| CC2.DCL00 | Partially implemented | |||||||
LDRA tool suite |
| 78 D | Fully implemented | ||||||
Parasoft C/C++test |
|
|
| CODSTA-CPP-53 | Fully implemented | |||||||
PRQA QA-C |
| 3204 3673 | Partially implemented | ||||||
RuleChecker |
| parameter-missing-const | Partially checked |
Related Vulnerabilities
Search for vulnerabilities resulting from the violation of this rule on the CERT website.
Related Guidelines
Bibliography
[Dewhurst 2002] | Gotcha #25, "#define Literals" |
[Saks 2000] |
...
...