...
Confusion over which instructions are executed and which are not can lead to serious programming errors and vulnerabilities, including denial of service, abnormal program termination, and data integrity violation. This problem is mitigated by the use of interactive development environments (IDEs) and editors that use fonts, colors, or other mechanisms to differentiate between comments and code. However, the problem can still manifest, for example, when reviewing source code printed on a black-and-white printer.
Recommendation | Severity | Likelihood | Remediation Cost | Priority | Level |
|---|---|---|---|---|---|
MSC04-C | Medium | Unlikely | Medium | P4 | L3 |
Automated Detection
Tool | Version | Checker | Description | ||||||
|---|---|---|---|---|---|---|---|---|---|
| Astrée |
| mline-comment sline-comment sline-splicing | Partially checked | ||||||
| GCC |
|
Can detect violations of this rule when the | |||||||||
| CC2.MSC04 | Fully implemented | |||||||
| LDRA tool suite |
| 119 S, 302 S, 611 S | Partially implemented | ||||||
| Parasoft C/C++test |
|
|
|
| MISRA2004- |
| 2_3, COMMENT-11, COMMENT-12, COMMENT-13 | Fully implemented | |||||||
| PRQA QA-C |
| 3108 |
| RuleChecker |
| mline-comment sline-comment sline-splicing | Partially checked |
Related Vulnerabilities
Search for vulnerabilities resulting from the violation of this rule on the CERT website.
Related Guidelines
| SEI CERT C++ Coding Standard | VOID MSC04-CPP. Use comments consistently and in a readable fashion |
| MISRA C:2012 | Rule 1.2 (advisory) |
Bibliography
...
...