|
|
|
[
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"elements": [
|
|
|
|
{
|
|
|
|
"type": "contract",
|
|
|
|
"name": "ArrayLengthAssignment",
|
|
|
|
"source_mapping": {
|
|
|
|
"start": 0,
|
|
|
|
"length": 1055,
|
|
|
|
"filename_used": "/GENERIC_PATH",
|
|
|
|
"filename_relative": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol",
|
|
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
|
|
"filename_short": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol",
|
|
|
|
"is_dependency": false,
|
|
|
|
"lines": [
|
|
|
|
1,
|
|
|
|
2,
|
|
|
|
3,
|
|
|
|
4,
|
|
|
|
5,
|
|
|
|
6,
|
|
|
|
7,
|
|
|
|
8,
|
|
|
|
9,
|
|
|
|
10,
|
|
|
|
11,
|
|
|
|
12,
|
|
|
|
13,
|
|
|
|
14,
|
|
|
|
15,
|
|
|
|
16,
|
|
|
|
17,
|
|
|
|
18,
|
|
|
|
19,
|
|
|
|
20,
|
|
|
|
21,
|
|
|
|
22,
|
|
|
|
23,
|
|
|
|
24,
|
|
|
|
25,
|
|
|
|
26,
|
|
|
|
27,
|
|
|
|
28,
|
|
|
|
29,
|
|
|
|
30,
|
|
|
|
31,
|
|
|
|
32,
|
|
|
|
33,
|
|
|
|
34,
|
|
|
|
35,
|
|
|
|
36,
|
|
|
|
37,
|
|
|
|
38,
|
|
|
|
39,
|
|
|
|
40,
|
|
|
|
41,
|
|
|
|
42,
|
|
|
|
43,
|
|
|
|
44,
|
|
|
|
45,
|
|
|
|
46
|
|
|
|
],
|
|
|
|
"starting_column": 1,
|
|
|
|
"ending_column": 2
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "node",
|
|
|
|
"name": "arr.length = param",
|
|
|
|
"source_mapping": {
|
|
|
|
"start": 527,
|
|
|
|
"length": 18,
|
|
|
|
"filename_used": "/GENERIC_PATH",
|
|
|
|
"filename_relative": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol",
|
|
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
|
|
"filename_short": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol",
|
|
|
|
"is_dependency": false,
|
|
|
|
"lines": [
|
|
|
|
26
|
|
|
|
],
|
|
|
|
"starting_column": 13,
|
|
|
|
"ending_column": 31
|
|
|
|
},
|
|
|
|
"type_specific_fields": {
|
|
|
|
"parent": {
|
|
|
|
"type": "function",
|
|
|
|
"name": "f",
|
|
|
|
"source_mapping": {
|
|
|
|
"start": 406,
|
|
|
|
"length": 647,
|
|
|
|
"filename_used": "/GENERIC_PATH",
|
|
|
|
"filename_relative": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol",
|
|
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
|
|
"filename_short": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol",
|
|
|
|
"is_dependency": false,
|
|
|
|
"lines": [
|
|
|
|
22,
|
|
|
|
23,
|
|
|
|
24,
|
|
|
|
25,
|
|
|
|
26,
|
|
|
|
27,
|
|
|
|
28,
|
|
|
|
29,
|
|
|
|
30,
|
|
|
|
31,
|
|
|
|
32,
|
|
|
|
33,
|
|
|
|
34,
|
|
|
|
35,
|
|
|
|
36,
|
|
|
|
37,
|
|
|
|
38,
|
|
|
|
39,
|
|
|
|
40,
|
|
|
|
41,
|
|
|
|
42,
|
|
|
|
43,
|
|
|
|
44,
|
|
|
|
45
|
|
|
|
],
|
|
|
|
"starting_column": 5,
|
|
|
|
"ending_column": 6
|
|
|
|
},
|
|
|
|
"type_specific_fields": {
|
|
|
|
"parent": {
|
|
|
|
"type": "contract",
|
|
|
|
"name": "ArrayLengthAssignment",
|
|
|
|
"source_mapping": {
|
|
|
|
"start": 0,
|
|
|
|
"length": 1055,
|
|
|
|
"filename_used": "/GENERIC_PATH",
|
|
|
|
"filename_relative": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol",
|
|
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
|
|
"filename_short": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol",
|
|
|
|
"is_dependency": false,
|
|
|
|
"lines": [
|
|
|
|
1,
|
|
|
|
2,
|
|
|
|
3,
|
|
|
|
4,
|
|
|
|
5,
|
|
|
|
6,
|
|
|
|
7,
|
|
|
|
8,
|
|
|
|
9,
|
|
|
|
10,
|
|
|
|
11,
|
|
|
|
12,
|
|
|
|
13,
|
|
|
|
14,
|
|
|
|
15,
|
|
|
|
16,
|
|
|
|
17,
|
|
|
|
18,
|
|
|
|
19,
|
|
|
|
20,
|
|
|
|
21,
|
|
|
|
22,
|
|
|
|
23,
|
|
|
|
24,
|
|
|
|
25,
|
|
|
|
26,
|
|
|
|
27,
|
|
|
|
28,
|
|
|
|
29,
|
|
|
|
30,
|
|
|
|
31,
|
|
|
|
32,
|
|
|
|
33,
|
|
|
|
34,
|
|
|
|
35,
|
|
|
|
36,
|
|
|
|
37,
|
|
|
|
38,
|
|
|
|
39,
|
|
|
|
40,
|
|
|
|
41,
|
|
|
|
42,
|
|
|
|
43,
|
|
|
|
44,
|
|
|
|
45,
|
|
|
|
46
|
|
|
|
],
|
|
|
|
"starting_column": 1,
|
|
|
|
"ending_column": 2
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"signature": "f(uint256,uint256)"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"description": "ArrayLengthAssignment (tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol#1-46) contract sets array length with a user-controlled value:\n\t- arr.length = param (tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol#26)\n",
|
|
|
|
"markdown": "[ArrayLengthAssignment](tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol#L1-L46) contract sets array length with a user-controlled value:\n\t- [arr.length = param](tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol#L26)\n",
|
|
|
|
"first_markdown_element": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol#L1-L46",
|
|
|
|
"id": "13e0633277a811f9416912f4404d805c1aaaaaacbc94989215c41de964718b0b",
|
|
|
|
"check": "controlled-array-length",
|
|
|
|
"impact": "High",
|
|
|
|
"confidence": "Medium"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"elements": [
|
|
|
|
{
|
|
|
|
"type": "contract",
|
|
|
|
"name": "ArrayLengthAssignment",
|
|
|
|
"source_mapping": {
|
|
|
|
"start": 0,
|
|
|
|
"length": 1055,
|
|
|
|
"filename_used": "/GENERIC_PATH",
|
|
|
|
"filename_relative": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol",
|
|
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
|
|
"filename_short": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol",
|
|
|
|
"is_dependency": false,
|
|
|
|
"lines": [
|
|
|
|
1,
|
|
|
|
2,
|
|
|
|
3,
|
|
|
|
4,
|
|
|
|
5,
|
|
|
|
6,
|
|
|
|
7,
|
|
|
|
8,
|
|
|
|
9,
|
|
|
|
10,
|
|
|
|
11,
|
|
|
|
12,
|
|
|
|
13,
|
|
|
|
14,
|
|
|
|
15,
|
|
|
|
16,
|
|
|
|
17,
|
|
|
|
18,
|
|
|
|
19,
|
|
|
|
20,
|
|
|
|
21,
|
|
|
|
22,
|
|
|
|
23,
|
|
|
|
24,
|
|
|
|
25,
|
|
|
|
26,
|
|
|
|
27,
|
|
|
|
28,
|
|
|
|
29,
|
|
|
|
30,
|
|
|
|
31,
|
|
|
|
32,
|
|
|
|
33,
|
|
|
|
34,
|
|
|
|
35,
|
|
|
|
36,
|
|
|
|
37,
|
|
|
|
38,
|
|
|
|
39,
|
|
|
|
40,
|
|
|
|
41,
|
|
|
|
42,
|
|
|
|
43,
|
|
|
|
44,
|
|
|
|
45,
|
|
|
|
46
|
|
|
|
],
|
|
|
|
"starting_column": 1,
|
|
|
|
"ending_column": 2
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "node",
|
|
|
|
"name": "a.x.length = param",
|
|
|
|
"source_mapping": {
|
|
|
|
"start": 818,
|
|
|
|
"length": 18,
|
|
|
|
"filename_used": "/GENERIC_PATH",
|
|
|
|
"filename_relative": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol",
|
|
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
|
|
"filename_short": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol",
|
|
|
|
"is_dependency": false,
|
|
|
|
"lines": [
|
|
|
|
36
|
|
|
|
],
|
|
|
|
"starting_column": 9,
|
|
|
|
"ending_column": 27
|
|
|
|
},
|
|
|
|
"type_specific_fields": {
|
|
|
|
"parent": {
|
|
|
|
"type": "function",
|
|
|
|
"name": "f",
|
|
|
|
"source_mapping": {
|
|
|
|
"start": 406,
|
|
|
|
"length": 647,
|
|
|
|
"filename_used": "/GENERIC_PATH",
|
|
|
|
"filename_relative": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol",
|
|
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
|
|
"filename_short": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol",
|
|
|
|
"is_dependency": false,
|
|
|
|
"lines": [
|
|
|
|
22,
|
|
|
|
23,
|
|
|
|
24,
|
|
|
|
25,
|
|
|
|
26,
|
|
|
|
27,
|
|
|
|
28,
|
|
|
|
29,
|
|
|
|
30,
|
|
|
|
31,
|
|
|
|
32,
|
|
|
|
33,
|
|
|
|
34,
|
|
|
|
35,
|
|
|
|
36,
|
|
|
|
37,
|
|
|
|
38,
|
|
|
|
39,
|
|
|
|
40,
|
|
|
|
41,
|
|
|
|
42,
|
|
|
|
43,
|
|
|
|
44,
|
|
|
|
45
|
|
|
|
],
|
|
|
|
"starting_column": 5,
|
|
|
|
"ending_column": 6
|
|
|
|
},
|
|
|
|
"type_specific_fields": {
|
|
|
|
"parent": {
|
|
|
|
"type": "contract",
|
|
|
|
"name": "ArrayLengthAssignment",
|
|
|
|
"source_mapping": {
|
|
|
|
"start": 0,
|
|
|
|
"length": 1055,
|
|
|
|
"filename_used": "/GENERIC_PATH",
|
|
|
|
"filename_relative": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol",
|
|
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
|
|
"filename_short": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol",
|
|
|
|
"is_dependency": false,
|
|
|
|
"lines": [
|
|
|
|
1,
|
|
|
|
2,
|
|
|
|
3,
|
|
|
|
4,
|
|
|
|
5,
|
|
|
|
6,
|
|
|
|
7,
|
|
|
|
8,
|
|
|
|
9,
|
|
|
|
10,
|
|
|
|
11,
|
|
|
|
12,
|
|
|
|
13,
|
|
|
|
14,
|
|
|
|
15,
|
|
|
|
16,
|
|
|
|
17,
|
|
|
|
18,
|
|
|
|
19,
|
|
|
|
20,
|
|
|
|
21,
|
|
|
|
22,
|
|
|
|
23,
|
|
|
|
24,
|
|
|
|
25,
|
|
|
|
26,
|
|
|
|
27,
|
|
|
|
28,
|
|
|
|
29,
|
|
|
|
30,
|
|
|
|
31,
|
|
|
|
32,
|
|
|
|
33,
|
|
|
|
34,
|
|
|
|
35,
|
|
|
|
36,
|
|
|
|
37,
|
|
|
|
38,
|
|
|
|
39,
|
|
|
|
40,
|
|
|
|
41,
|
|
|
|
42,
|
|
|
|
43,
|
|
|
|
44,
|
|
|
|
45,
|
|
|
|
46
|
|
|
|
],
|
|
|
|
"starting_column": 1,
|
|
|
|
"ending_column": 2
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"signature": "f(uint256,uint256)"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"description": "ArrayLengthAssignment (tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol#1-46) contract sets array length with a user-controlled value:\n\t- a.x.length = param (tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol#36)\n",
|
|
|
|
"markdown": "[ArrayLengthAssignment](tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol#L1-L46) contract sets array length with a user-controlled value:\n\t- [a.x.length = param](tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol#L36)\n",
|
|
|
|
"first_markdown_element": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol#L1-L46",
|
|
|
|
"id": "f455c672028771f21282b59fb58b5eac51185eae4ac44e65a2e1f4df6db0c6e4",
|
|
|
|
"check": "controlled-array-length",
|
|
|
|
"impact": "High",
|
|
|
|
"confidence": "Medium"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"elements": [
|
|
|
|
{
|
|
|
|
"type": "contract",
|
|
|
|
"name": "ArrayLengthAssignment",
|
|
|
|
"source_mapping": {
|
|
|
|
"start": 0,
|
|
|
|
"length": 1055,
|
|
|
|
"filename_used": "/GENERIC_PATH",
|
|
|
|
"filename_relative": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol",
|
|
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
|
|
"filename_short": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol",
|
|
|
|
"is_dependency": false,
|
|
|
|
"lines": [
|
|
|
|
1,
|
|
|
|
2,
|
|
|
|
3,
|
|
|
|
4,
|
|
|
|
5,
|
|
|
|
6,
|
|
|
|
7,
|
|
|
|
8,
|
|
|
|
9,
|
|
|
|
10,
|
|
|
|
11,
|
|
|
|
12,
|
|
|
|
13,
|
|
|
|
14,
|
|
|
|
15,
|
|
|
|
16,
|
|
|
|
17,
|
|
|
|
18,
|
|
|
|
19,
|
|
|
|
20,
|
|
|
|
21,
|
|
|
|
22,
|
|
|
|
23,
|
|
|
|
24,
|
|
|
|
25,
|
|
|
|
26,
|
|
|
|
27,
|
|
|
|
28,
|
|
|
|
29,
|
|
|
|
30,
|
|
|
|
31,
|
|
|
|
32,
|
|
|
|
33,
|
|
|
|
34,
|
|
|
|
35,
|
|
|
|
36,
|
|
|
|
37,
|
|
|
|
38,
|
|
|
|
39,
|
|
|
|
40,
|
|
|
|
41,
|
|
|
|
42,
|
|
|
|
43,
|
|
|
|
44,
|
|
|
|
45,
|
|
|
|
46
|
|
|
|
],
|
|
|
|
"starting_column": 1,
|
|
|
|
"ending_column": 2
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "node",
|
|
|
|
"name": "b.subStruct.x.length = param + 1",
|
|
|
|
"source_mapping": {
|
|
|
|
"start": 964,
|
|
|
|
"length": 32,
|
|
|
|
"filename_used": "/GENERIC_PATH",
|
|
|
|
"filename_relative": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol",
|
|
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
|
|
"filename_short": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol",
|
|
|
|
"is_dependency": false,
|
|
|
|
"lines": [
|
|
|
|
41
|
|
|
|
],
|
|
|
|
"starting_column": 9,
|
|
|
|
"ending_column": 41
|
|
|
|
},
|
|
|
|
"type_specific_fields": {
|
|
|
|
"parent": {
|
|
|
|
"type": "function",
|
|
|
|
"name": "f",
|
|
|
|
"source_mapping": {
|
|
|
|
"start": 406,
|
|
|
|
"length": 647,
|
|
|
|
"filename_used": "/GENERIC_PATH",
|
|
|
|
"filename_relative": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol",
|
|
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
|
|
"filename_short": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol",
|
|
|
|
"is_dependency": false,
|
|
|
|
"lines": [
|
|
|
|
22,
|
|
|
|
23,
|
|
|
|
24,
|
|
|
|
25,
|
|
|
|
26,
|
|
|
|
27,
|
|
|
|
28,
|
|
|
|
29,
|
|
|
|
30,
|
|
|
|
31,
|
|
|
|
32,
|
|
|
|
33,
|
|
|
|
34,
|
|
|
|
35,
|
|
|
|
36,
|
|
|
|
37,
|
|
|
|
38,
|
|
|
|
39,
|
|
|
|
40,
|
|
|
|
41,
|
|
|
|
42,
|
|
|
|
43,
|
|
|
|
44,
|
|
|
|
45
|
|
|
|
],
|
|
|
|
"starting_column": 5,
|
|
|
|
"ending_column": 6
|
|
|
|
},
|
|
|
|
"type_specific_fields": {
|
|
|
|
"parent": {
|
|
|
|
"type": "contract",
|
|
|
|
"name": "ArrayLengthAssignment",
|
|
|
|
"source_mapping": {
|
|
|
|
"start": 0,
|
|
|
|
"length": 1055,
|
|
|
|
"filename_used": "/GENERIC_PATH",
|
|
|
|
"filename_relative": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol",
|
|
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
|
|
"filename_short": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol",
|
|
|
|
"is_dependency": false,
|
|
|
|
"lines": [
|
|
|
|
1,
|
|
|
|
2,
|
|
|
|
3,
|
|
|
|
4,
|
|
|
|
5,
|
|
|
|
6,
|
|
|
|
7,
|
|
|
|
8,
|
|
|
|
9,
|
|
|
|
10,
|
|
|
|
11,
|
|
|
|
12,
|
|
|
|
13,
|
|
|
|
14,
|
|
|
|
15,
|
|
|
|
16,
|
|
|
|
17,
|
|
|
|
18,
|
|
|
|
19,
|
|
|
|
20,
|
|
|
|
21,
|
|
|
|
22,
|
|
|
|
23,
|
|
|
|
24,
|
|
|
|
25,
|
|
|
|
26,
|
|
|
|
27,
|
|
|
|
28,
|
|
|
|
29,
|
|
|
|
30,
|
|
|
|
31,
|
|
|
|
32,
|
|
|
|
33,
|
|
|
|
34,
|
|
|
|
35,
|
|
|
|
36,
|
|
|
|
37,
|
|
|
|
38,
|
|
|
|
39,
|
|
|
|
40,
|
|
|
|
41,
|
|
|
|
42,
|
|
|
|
43,
|
|
|
|
44,
|
|
|
|
45,
|
|
|
|
46
|
|
|
|
],
|
|
|
|
"starting_column": 1,
|
|
|
|
"ending_column": 2
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"signature": "f(uint256,uint256)"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"description": "ArrayLengthAssignment (tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol#1-46) contract sets array length with a user-controlled value:\n\t- b.subStruct.x.length = param + 1 (tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol#41)\n",
|
|
|
|
"markdown": "[ArrayLengthAssignment](tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol#L1-L46) contract sets array length with a user-controlled value:\n\t- [b.subStruct.x.length = param + 1](tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol#L41)\n",
|
|
|
|
"first_markdown_element": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol#L1-L46",
|
|
|
|
"id": "82175a5c24c40a1afe4c59f4271a2c12e577ad25e89e6e319e47b4f8f2a76943",
|
|
|
|
"check": "controlled-array-length",
|
|
|
|
"impact": "High",
|
|
|
|
"confidence": "Medium"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
]
|