...
Code Block | ||||
---|---|---|---|---|
| ||||
enum EnumType { First, Second, Third }; void f(int intVar) { if (intVar < First || intVar > Third) { // Handle error } EnumType enumVar = static_cast<EnumType>(intVar); } |
Automated Detection
...
Tool
...
Version
...
Checker
...
Description
...
Compliant Solution (Scoped Enumeration)
...
Rule | Severity | Likelihood | Remediation Cost | Priority | Level |
---|---|---|---|---|---|
INT50-CPP | Medium | Unlikely | Medium | P4 | L3 |
Automated Detection
Tool | Version | Checker | Description |
---|---|---|---|
PRQA QA-C++ | 4.1 | 2910, 2911, 2912, 2913 |
Related Vulnerabilities
Search for vulnerabilities resulting from the violation of this rule on the CERT website.
...