...
| Code Block | ||||
|---|---|---|---|---|
| ||||
#include <cstdlib>
[[noreturn]] void f(int i) {
if (i > 0)
throw "Received positive input";
std::exit(0);
} |
Risk Assessment
Returning from a function marked [[noreturn]] results in undefined behavior that might be exploited to cause data integrity violations.
Rule | Severity | Likelihood | Remediation Cost | Priority | Level |
|---|---|---|---|---|---|
MSC55-CPP | Medium | Unlikely | Low | P2 | L3 |
...
Related Vulnerabilities
Search for vulnerabilities resulting from the violation of this rule on the CERT website.
...