...
Code Block | ||||
---|---|---|---|---|
| ||||
#include <string.h> void func(void) { char s[10] = "abc"; strcpy(&s[3], "def"); } |
Risk Assessment
Recommendation | Severity | Likelihood | Remediation Cost | Priority | Level |
---|---|---|---|---|---|
STR11-C | Low | Probable | Low | P6 | L2 |
Automated Detection
Tool | Version | Checker | Description | ||||
---|---|---|---|---|---|---|---|
Astrée |
|
Supported, but no explicit checker | |
Compass/ROSE |
| CC2.STR36 | Fully implemented | |||||||
LDRA tool suite |
| 404 S | Partially implemented | ||||||
Parasoft C/C++test |
|
|
| CODSTA-16 |
Polyspace Bug Finder | R2016a | String does not terminate with null character | |||||||
PRQA QA-C |
| 1312,0690 | Partially implemented | ||||||
Splint |
|
Related Vulnerabilities
Search for vulnerabilities resulting from the violation of this rule on the CERT website.
Related Guidelines
Bibliography
[ECTC 1998] | Section A.8, "Character Array Initialization" |
[ISO/IEC 9899:2011] | Subclause 6.7.9, "Initialization" |
[Seacord 2013] | Chapter 2, "Strings" |
...
...