
...
Returning NULL
rather than a zero-length array can lead to vulnerabilities when the client code does not handle NULL
properly. Abnormal program termination can result when the calling function performs operations on NULL
.
Rule | Severity | Likelihood | Detectable | RepairableRemediation Cost | Priority | Level |
---|---|---|---|---|---|---|
MSC19-C | Low | Unlikely | Yes | NoHigh | P1P2 | L3 |
Automated Detection
Tool | Version | Checker | Description | ||||||
---|---|---|---|---|---|---|---|---|---|
Parasoft C/C++test |
| CERT_C-MSC19-a | Avoid accessing arrays out of bounds | ||||||
PC-lint Plus |
| 413, 418, 419, 420, 473, | Partially supported |
...