...
Mixing allocation and deallocation functions can lead to memory corruption issues, or result in accessing out-of-bounds memory.
Rule | Severity | Likelihood | Detectable | RepairableRemediation Cost | Priority | Level |
|---|---|---|---|---|---|---|
WIN30-C | Low | Probable | No | LowNo | P6P2 | L2L3 |
Automated Detection
Tool | Version | Checker | Description | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Astrée |
| Supported: Can be checked with appropriate analysis stubs. | ||||||||||||||
| CodeSonar |
| ALLOC.TM | Type mismatch | |||||||||||||
| Coverity |
| ALLOC_FREE_MISMATCH (needs improvement) | Partially implemented; needs improvement | |||||||||||||
| Klocwork |
| FMM.MIGHT FMM.MUST | ||||||||||||||
| Parasoft C/C++test |
| BDCERT_C- | RES-LEAKSWIN30-a | Ensure resources are freed | ||||||||||||
| R2017b |
| CERT C: Rule WIN30-C | Checks for mismatched | Mismatchedalloc/dealloc functions on Windows | (rule fully covered) | ||||||||||
| PVS-Studio |
| Improper deallocation function causes memory corruption issues
| 6.22 | V701 | General analysis rule
| V701 |
Related Vulnerabilities
Search for vulnerabilities resulting from the violation of this rule on the CERT website.
...