GitHub
CERT Secure Coding

Characters and Strings (STR)

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
FIO20-C. Avoid unintentional truncation when using fgets() or fgetws()
FIO30-C. Exclude user input from format strings
FIO40-C. Reset strings on fgets() or fgetws() failure
FIO47-C. Use valid format strings
INT07-C. Use only explicitly signed or unsigned char type for numeric values
POS30-C. Use the readlink() function properly
STR37-C. Arguments to character-handling functions must be representable as an unsigned char