...
This is an instance of exception MSC57-EX2 to MSC57-JG. Detect and remove dead code.
...
Applicability
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.
Guideline | Severity | Likelihood | Remediation Cost | Priority | Level |
---|---|---|---|---|---|
MSC56-JG | medium | unlikely | medium | P4 | L3 |
...
Nested block comments and inconsistent use of comments could be detected by suitable static analysis tools.
Related Vulnerabilities
Search for vulnerabilities resulting from the violation of this rule on the CERT website.
Related Guidelines
C Secure Coding Standard: MSC04-C. Use comments consistently and in a readable fashion
C++ Secure Coding Standard: MSC04-CPP. Use comments consistently and in a readable fashion
Bibliography
[Reddy 2000] Java Coding Style Guide Section 5.0 Comments
...