2nd Array Index Out Of Bounds
This checks array index out of bounds.(for two-dimensional array)
- CWE-129: refer to http://cwe.mitre.org/data/definitions/129.html
refer to below example:
Caution: It is possible there will be more test cases.
case 1 | function_1(int (*array_parameter)[4])
} |
---|---|
case 2 | function_1(int (*array_parameter)[4]) int (*array_ptr)[4] = basic_array; |
This checker should not detect for below case
case 1 | function_1(int (*array_parameter)[4]) int (*array_ptr)[4] = basic_array; |
---|
the checker config can be like below:
{ "code" : "CHECK_ARRAY_INDEX_OUT_OF_BOUNDS_TWO_DIMESIONAL" , "name" : "Checking array index out of bounds" , "type" : "BOTH" , "categoryName" : "Tizen" , "severityCode" : "CRI" , "version" : "2.5.33" , "description" : "Array index out of bounds" , "isActive" : true , "properties" : { }, "cwe" : 129 } |