...
Confusing a lowercase letter l (ell) with a digit 1 (one) when indicating that an integer denotation is a long
value could lead to an incorrect value being written into code.
Recommendation | Severity | Likelihood | Remediation Cost | Priority | Level |
---|---|---|---|---|---|
DCL16-C | Low | Unlikely | Low | P3 | L3 |
Automated Detection
Tool | Version | Checker | Description | ||||||
---|---|---|---|---|---|---|---|---|---|
Astrée |
| long-suffix | Fully checked | ||||||
CodeSonar |
| LANG.TYPE.CSUF | Confusing literal suffix | ||||||
| CC2.DCL16 | Fully implemented | |||||||
LDRA tool suite |
| 252 S | Fully implemented | ||||||
Parasoft C/C++test |
|
|
| PORT-01 | Fully implemented | |||||||
PRQA QA-C |
| 1280 | Fully implemented | ||||||
RuleChecker |
| long-suffix | Fully checked | ||||||
SonarQube C/C++ Plugin |
| LiteralSuffix |
Related Vulnerabilities
Search for vulnerabilities resulting from the violation of this rule on the CERT website.
Related Guidelines
SEI CERT C++ Coding Standard | DCL16-CPP. Use "L," not "l," to indicate a long value |
MISRA C:2012 | Rule 7.3 (required) |
Bibliography
[Lockheed Martin 2005] | AV Rule 14, Literal suffixes shall use uppercase rather than lowercase letters |
...
...