Characters and Strings (STR)
- STR00-C. Represent characters using an appropriate type
- STR01-C. Adopt and implement a consistent plan for managing strings
- STR02-C. Sanitize data passed to complex subsystems
- STR03-C. Do not inadvertently truncate a string
- STR04-C. Use plain char for characters in the basic character set
- STR05-C. Use pointers to const when referring to string literals
- STR06-C. Do not assume that strtok() leaves the parse string unchanged
- STR09-C. Don't assume numeric values for expressions with type plain character
- STR10-C. Do not concatenate different type of string literals
- STR11-C. Do not specify the bound of a character array initialized with a string literal
Information for Editors
In order to have a new guideline automatically listed above be sure to label it str and recommendation .
Risk Assessment Summary
| Rule | Severity | Likelihood | Detectable | Repairable | Priority | Level |
|---|---|---|---|---|---|---|
| STR00-C | Medium | Probable | No | No | P4 | L3 |
| STR01-C | Low | Unlikely | No | No | P1 | L3 |
| STR02-C | High | Likely | No | No | P9 | L2 |
| STR03-C | Medium | Probable | No | No | P4 | L3 |
| STR04-C | Low | Unlikely | No | Yes | P2 | L3 |
| STR05-C | Low | Unlikely | Yes | Yes | P3 | L3 |
| STR06-C | Medium | Likely | No | No | P6 | L2 |
| STR08-C | High | Probable | No | No | P6 | L2 |
| STR09-C | Low | Unlikely | Yes | No | P2 | L3 |
| STR10-C | Low | Probable | Yes | No | P4 | L3 |
| STR11-C | Low | Probable | Yes | Yes | P6 | L2 |


