...
In this compliant solution, the characters referred to by the pointer c
are const
-qualified, meaning that any attempts to assign them to different values is an error.
Code Block | ||
---|---|---|
| ||
char const char *c = "Hello"; |
Compliant Solution (mutable strings)
...
Recommendation | Severity | Likelihood | Remediation Cost | Priority | Level |
---|---|---|---|---|---|
STR05-A | low | unlikely | high | P1 | L1 L3 |
Automated Detection
The LDRA tool suite V 7.6.0 is able to detect violations of this recommendation.
...