sqc 0.4.13

Software Code Quality - CERT C compliance checker
[metadata]
id = "ARR02-C"
type = "recommendation"
category = "ARR"
number = 2
title = "Explicitly specify array bounds, even if implicitly defined by an initializer"
description = """
The C Standard allows an array variable to be declared both with a bound and
with an initialization literal. The initialization literal also implies an array
bound in the number of elements specified. The size implied by an initialization
literal is usually specified by the number of elements, int array[] = {1, 2, 3};
/* 3-element array */
"""
severity = "Medium"
likelihood = "Unlikely"
priority = "P6"
level = "L2"
cert_version = "2016 Edition (Wiki)"
last_modified = "Unknown"

[rules.cert_c.ARR02-C]
enabled = true

[references]
wiki = "https://wiki.sei.cmu.edu/confluence/display/c/ARR02-C.+Explicitly+specify+array+bounds%2C+even+if+implicitly+defined+by+an+initializer"
cwe = ["CWE-665"]