...
This rule appears in the C Secure Coding Standard as ARR30-C. Guarantee that array indices are within the valid range.
...
Bibliography
Wiki Markup |
---|
\[[ISO/IEC PDTR 24772|AA. Bibliography#ISO/IEC PDTR 24772]\] "XYX Boundary Beginning Violation," "XYY Wrap-around Error," and "XYZ Unchecked Array Indexing" \[[MITRE|AA. Bibliography#MITRE]\] [CWE ID 119|http://cwe.mitre.org/data/definitions/119.html], "Failure to Constrain Operations within the Bounds of a Memory Buffer" \[MITRE\] [CWE ID 129|http://cwe.mitre.org/data/definitions/129.html], "Improper Validation of Array Index" \[[Viega 05|AA. Bibliography#Viega 05]\] Section 5.2.13, "Unchecked array indexing" |
...
ARR02ARR04-CPP. Explicitly specify array bounds, even if implicitly defined by an initializerAssume responsibility for cleaning up data referenced by a container of pointers 06. Arrays and the STL (ARR) ARR31-CPP. Use consistent array notation across all source files