mirror of https://github.com/crytic/slither
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
604 lines
28 KiB
604 lines
28 KiB
4 years ago
|
[
|
||
|
[
|
||
|
{
|
||
|
"elements": [
|
||
|
{
|
||
|
"type": "contract",
|
||
|
"name": "ArrayLengthAssignment",
|
||
|
"source_mapping": {
|
||
|
"start": 0,
|
||
|
"length": 1055,
|
||
|
"filename_used": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_relative": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol",
|
||
4 years ago
|
"filename_absolute": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_short": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol",
|
||
4 years ago
|
"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",
|
||
4 years ago
|
"name": "arr.length = param",
|
||
4 years ago
|
"source_mapping": {
|
||
4 years ago
|
"start": 527,
|
||
|
"length": 18,
|
||
4 years ago
|
"filename_used": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_relative": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol",
|
||
4 years ago
|
"filename_absolute": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_short": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol",
|
||
4 years ago
|
"is_dependency": false,
|
||
|
"lines": [
|
||
4 years ago
|
26
|
||
4 years ago
|
],
|
||
4 years ago
|
"starting_column": 13,
|
||
|
"ending_column": 31
|
||
4 years ago
|
},
|
||
|
"type_specific_fields": {
|
||
|
"parent": {
|
||
|
"type": "function",
|
||
|
"name": "f",
|
||
|
"source_mapping": {
|
||
|
"start": 406,
|
||
|
"length": 647,
|
||
|
"filename_used": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_relative": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol",
|
||
4 years ago
|
"filename_absolute": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_short": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol",
|
||
4 years ago
|
"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",
|
||
4 years ago
|
"filename_relative": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol",
|
||
4 years ago
|
"filename_absolute": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_short": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol",
|
||
4 years ago
|
"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)"
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
],
|
||
4 years ago
|
"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",
|
||
|
"id": "13e0633277a811f9416912f4404d805c1aaaaaacbc94989215c41de964718b0b",
|
||
4 years ago
|
"check": "controlled-array-length",
|
||
|
"impact": "High",
|
||
|
"confidence": "Medium"
|
||
|
},
|
||
|
{
|
||
|
"elements": [
|
||
|
{
|
||
|
"type": "contract",
|
||
|
"name": "ArrayLengthAssignment",
|
||
|
"source_mapping": {
|
||
|
"start": 0,
|
||
|
"length": 1055,
|
||
|
"filename_used": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_relative": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol",
|
||
4 years ago
|
"filename_absolute": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_short": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol",
|
||
4 years ago
|
"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",
|
||
4 years ago
|
"name": "a.x.length = param",
|
||
4 years ago
|
"source_mapping": {
|
||
4 years ago
|
"start": 818,
|
||
4 years ago
|
"length": 18,
|
||
|
"filename_used": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_relative": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol",
|
||
4 years ago
|
"filename_absolute": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_short": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol",
|
||
4 years ago
|
"is_dependency": false,
|
||
|
"lines": [
|
||
4 years ago
|
36
|
||
4 years ago
|
],
|
||
4 years ago
|
"starting_column": 9,
|
||
|
"ending_column": 27
|
||
4 years ago
|
},
|
||
|
"type_specific_fields": {
|
||
|
"parent": {
|
||
|
"type": "function",
|
||
|
"name": "f",
|
||
|
"source_mapping": {
|
||
|
"start": 406,
|
||
|
"length": 647,
|
||
|
"filename_used": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_relative": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol",
|
||
4 years ago
|
"filename_absolute": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_short": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol",
|
||
4 years ago
|
"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",
|
||
4 years ago
|
"filename_relative": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol",
|
||
4 years ago
|
"filename_absolute": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_short": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol",
|
||
4 years ago
|
"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)"
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
],
|
||
4 years ago
|
"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",
|
||
|
"id": "f455c672028771f21282b59fb58b5eac51185eae4ac44e65a2e1f4df6db0c6e4",
|
||
4 years ago
|
"check": "controlled-array-length",
|
||
|
"impact": "High",
|
||
|
"confidence": "Medium"
|
||
|
},
|
||
|
{
|
||
|
"elements": [
|
||
|
{
|
||
|
"type": "contract",
|
||
|
"name": "ArrayLengthAssignment",
|
||
|
"source_mapping": {
|
||
|
"start": 0,
|
||
|
"length": 1055,
|
||
|
"filename_used": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_relative": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol",
|
||
4 years ago
|
"filename_absolute": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_short": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol",
|
||
4 years ago
|
"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",
|
||
4 years ago
|
"name": "b.subStruct.x.length = param + 1",
|
||
4 years ago
|
"source_mapping": {
|
||
4 years ago
|
"start": 964,
|
||
|
"length": 32,
|
||
4 years ago
|
"filename_used": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_relative": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol",
|
||
4 years ago
|
"filename_absolute": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_short": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol",
|
||
4 years ago
|
"is_dependency": false,
|
||
|
"lines": [
|
||
4 years ago
|
41
|
||
4 years ago
|
],
|
||
|
"starting_column": 9,
|
||
4 years ago
|
"ending_column": 41
|
||
4 years ago
|
},
|
||
|
"type_specific_fields": {
|
||
|
"parent": {
|
||
|
"type": "function",
|
||
|
"name": "f",
|
||
|
"source_mapping": {
|
||
|
"start": 406,
|
||
|
"length": 647,
|
||
|
"filename_used": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_relative": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol",
|
||
4 years ago
|
"filename_absolute": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_short": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol",
|
||
4 years ago
|
"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",
|
||
4 years ago
|
"filename_relative": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol",
|
||
4 years ago
|
"filename_absolute": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_short": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol",
|
||
4 years ago
|
"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)"
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
],
|
||
4 years ago
|
"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",
|
||
|
"id": "82175a5c24c40a1afe4c59f4271a2c12e577ad25e89e6e319e47b4f8f2a76943",
|
||
4 years ago
|
"check": "controlled-array-length",
|
||
|
"impact": "High",
|
||
|
"confidence": "Medium"
|
||
|
}
|
||
|
]
|
||
|
]
|