GitHub
CERT Secure Coding

Arrays (ARR)

Information for Editors
In order to have a new guideline automatically listed above be sure to label it arr and rule .

Risk Assessment Summary

Rule Severity Likelihood Detectable Repairable Priority Level
ARR30-C High Likely No No P9 L2
ARR32-C High Probable No No P6 L2
ARR36-C Medium Probable No No P4 L3
ARR37-C Medium Probable Yes No P8 L2
ARR38-C High Likely No No P9 L2
ARR39-C High Probable No No P6 L2
14. Arrays (ARR)
MEM33-C. Allocate and copy structures containing a flexible array member dynamically
STR11-C. Do not specify the bound of a character array initialized with a string literal
STR31-C. Guarantee that storage for strings has sufficient space for character data and the null terminator
VOID ARR31-CPP. Use consistent array notation across all source files
VOID CTR00-CPP. Understand when to prefer vectors over arrays
VOID CTR01-CPP. Do not apply the sizeof operator to a pointer when taking the size of an array
VOID CTR02-CPP. Explicitly specify array bounds, even if implicitly defined by an initializer
VOID CTR35-CPP. Do not allow loops to iterate beyond the end of an array or container
VOID CTR37-CPP. Do not add or subtract an integer to a pointer to a non-array object
VOID STR35-C. Do not copy data from an unbounded source to a fixed-length array