...
Copy operations that mutate the source operand or global state can lead to unexpected program behavior. Using such a type in a Standard Template Library container or algorithm can also lead to undefined behavior.
Rule | Severity | LikelihoodRemediation Cost | Detectable | Repairable | Priority | Level |
|---|---|---|---|---|---|---|
OOP58-CPP | Low | Likely | Yes | LowNo | P9P6 | L2 |
Automated Detection
Tool | Version | Checker | Description | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| CodeSonar |
| LANG.FUNCS.COPINC | Copy Operation Parameter Is Not const | |||||||||||
| Helix QAC |
| C++4075 | ||||||||||||
| Klocwork |
| CERT.OOP.COPY_MUTATES | ||||||||||||
| Parasoft C/C++test |
| CERT_CPP-OOP58-a | Copy operations must not mutate the source object | |||||||||||
| Polyspace Bug Finder |
| CERT C++: OOP58-CPP | Checks for copy operation modifying source operand (rule partially covered) | PRQA QA-C++ | | Include Page | | PRQA QA-C++_V | PRQA QA-C++_V | 4075
Related Vulnerabilities
Search for vulnerabilities resulting from the violation of this rule on the CERT website.
...