...
Slicing results in information loss, which could lead to abnormal program execution or denial-of-service attacks.
Rule | Severity | Likelihood | Remediation Cost | Priority | Level |
---|---|---|---|---|---|
OOP51-CPP | Low | Probable | Medium | P4 | L3 |
Automated Detection
Tool | Version | Checker | Description |
---|---|---|---|
Parasoft C/C++test |
|
|
|
CERT_CPP-OOP51-a | Avoid slicing function arguments / return value | |||||||
PRQA QA-C++ |
| 3072 |
Related Vulnerabilities
Search for other vulnerabilities resulting from the violation of this rule on the CERT website.
Related Guidelines
SEI CERT C++ Coding Standard | ERR61-CPP. Catch exceptions by lvalue reference |
SEI CERT C Coding Standard |
Bibliography
[Dewhurst 2002] | Gotcha #38, "Slicing" |
[ISO/IEC 14882-2014] | Subclause 12.8, "Copying and Moving Class Objects" |
[Sutter 2000] | Item 40, "Object Lifetimes—Part I" |
...
...