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.
428 lines
21 KiB
428 lines
21 KiB
4 years ago
|
[
|
||
|
[
|
||
|
{
|
||
|
"elements": [
|
||
|
{
|
||
|
"type": "function",
|
||
|
"name": "deleteSt",
|
||
|
"source_mapping": {
|
||
4 years ago
|
"start": 114,
|
||
|
"length": 80,
|
||
4 years ago
|
"filename_used": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_relative": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol",
|
||
4 years ago
|
"filename_absolute": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_short": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol",
|
||
4 years ago
|
"is_dependency": false,
|
||
|
"lines": [
|
||
|
9,
|
||
|
10,
|
||
|
11
|
||
|
],
|
||
|
"starting_column": 5,
|
||
|
"ending_column": 6
|
||
|
},
|
||
|
"type_specific_fields": {
|
||
|
"parent": {
|
||
|
"type": "contract",
|
||
|
"name": "Lib",
|
||
|
"source_mapping": {
|
||
4 years ago
|
"start": 29,
|
||
|
"length": 168,
|
||
4 years ago
|
"filename_used": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_relative": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol",
|
||
4 years ago
|
"filename_absolute": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_short": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol",
|
||
4 years ago
|
"is_dependency": false,
|
||
|
"lines": [
|
||
|
3,
|
||
|
4,
|
||
|
5,
|
||
|
6,
|
||
|
7,
|
||
|
8,
|
||
|
9,
|
||
|
10,
|
||
|
11,
|
||
|
12,
|
||
|
13
|
||
|
],
|
||
|
"starting_column": 1,
|
||
|
"ending_column": 2
|
||
|
}
|
||
|
},
|
||
|
"signature": "deleteSt(Lib.MyStruct[1])"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"type": "struct",
|
||
|
"name": "MyStruct",
|
||
|
"source_mapping": {
|
||
4 years ago
|
"start": 47,
|
||
4 years ago
|
"length": 61,
|
||
|
"filename_used": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_relative": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol",
|
||
4 years ago
|
"filename_absolute": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_short": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol",
|
||
4 years ago
|
"is_dependency": false,
|
||
|
"lines": [
|
||
|
5,
|
||
|
6,
|
||
|
7
|
||
|
],
|
||
|
"starting_column": 5,
|
||
|
"ending_column": 6
|
||
|
},
|
||
|
"type_specific_fields": {
|
||
|
"parent": {
|
||
|
"type": "contract",
|
||
|
"name": "Lib",
|
||
|
"source_mapping": {
|
||
4 years ago
|
"start": 29,
|
||
|
"length": 168,
|
||
4 years ago
|
"filename_used": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_relative": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol",
|
||
4 years ago
|
"filename_absolute": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_short": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol",
|
||
4 years ago
|
"is_dependency": false,
|
||
|
"lines": [
|
||
|
3,
|
||
|
4,
|
||
|
5,
|
||
|
6,
|
||
|
7,
|
||
|
8,
|
||
|
9,
|
||
|
10,
|
||
|
11,
|
||
|
12,
|
||
|
13
|
||
|
],
|
||
|
"starting_column": 1,
|
||
|
"ending_column": 2
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"type": "node",
|
||
|
"name": "delete st[0]",
|
||
|
"source_mapping": {
|
||
4 years ago
|
"start": 175,
|
||
4 years ago
|
"length": 12,
|
||
|
"filename_used": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_relative": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol",
|
||
4 years ago
|
"filename_absolute": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_short": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol",
|
||
4 years ago
|
"is_dependency": false,
|
||
|
"lines": [
|
||
|
10
|
||
|
],
|
||
|
"starting_column": 9,
|
||
|
"ending_column": 21
|
||
|
},
|
||
|
"type_specific_fields": {
|
||
|
"parent": {
|
||
|
"type": "function",
|
||
|
"name": "deleteSt",
|
||
|
"source_mapping": {
|
||
4 years ago
|
"start": 114,
|
||
|
"length": 80,
|
||
4 years ago
|
"filename_used": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_relative": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol",
|
||
4 years ago
|
"filename_absolute": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_short": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol",
|
||
4 years ago
|
"is_dependency": false,
|
||
|
"lines": [
|
||
|
9,
|
||
|
10,
|
||
|
11
|
||
|
],
|
||
|
"starting_column": 5,
|
||
|
"ending_column": 6
|
||
|
},
|
||
|
"type_specific_fields": {
|
||
|
"parent": {
|
||
|
"type": "contract",
|
||
|
"name": "Lib",
|
||
|
"source_mapping": {
|
||
4 years ago
|
"start": 29,
|
||
|
"length": 168,
|
||
4 years ago
|
"filename_used": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_relative": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol",
|
||
4 years ago
|
"filename_absolute": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_short": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol",
|
||
4 years ago
|
"is_dependency": false,
|
||
|
"lines": [
|
||
|
3,
|
||
|
4,
|
||
|
5,
|
||
|
6,
|
||
|
7,
|
||
|
8,
|
||
|
9,
|
||
|
10,
|
||
|
11,
|
||
|
12,
|
||
|
13
|
||
|
],
|
||
|
"starting_column": 1,
|
||
|
"ending_column": 2
|
||
|
}
|
||
|
},
|
||
|
"signature": "deleteSt(Lib.MyStruct[1])"
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
],
|
||
4 years ago
|
"description": "Lib.deleteSt(Lib.MyStruct[1]) (tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol#9-11) deletes Lib.MyStruct (tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol#5-7) which contains a mapping:\n\t-delete st[0] (tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol#10)\n",
|
||
|
"markdown": "[Lib.deleteSt(Lib.MyStruct[1])](tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol#L9-L11) deletes [Lib.MyStruct](tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol#L5-L7) which contains a mapping:\n\t-[delete st[0]](tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol#L10)\n",
|
||
|
"id": "4c08076815986fec8b813cb66a7f7fe7002a5e87179bbd46e59279da2f46e992",
|
||
4 years ago
|
"check": "mapping-deletion",
|
||
|
"impact": "Medium",
|
||
|
"confidence": "High"
|
||
|
},
|
||
|
{
|
||
|
"elements": [
|
||
|
{
|
||
|
"type": "function",
|
||
|
"name": "deleteBalance",
|
||
|
"source_mapping": {
|
||
4 years ago
|
"start": 595,
|
||
4 years ago
|
"length": 137,
|
||
|
"filename_used": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_relative": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol",
|
||
4 years ago
|
"filename_absolute": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_short": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol",
|
||
4 years ago
|
"is_dependency": false,
|
||
|
"lines": [
|
||
|
29,
|
||
|
30,
|
||
4 years ago
|
31,
|
||
|
32
|
||
4 years ago
|
],
|
||
|
"starting_column": 5,
|
||
|
"ending_column": 6
|
||
|
},
|
||
|
"type_specific_fields": {
|
||
|
"parent": {
|
||
|
"type": "contract",
|
||
|
"name": "Balances",
|
||
|
"source_mapping": {
|
||
4 years ago
|
"start": 199,
|
||
|
"length": 866,
|
||
4 years ago
|
"filename_used": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_relative": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol",
|
||
4 years ago
|
"filename_absolute": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_short": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol",
|
||
4 years ago
|
"is_dependency": false,
|
||
|
"lines": [
|
||
|
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,
|
||
4 years ago
|
43,
|
||
|
44
|
||
4 years ago
|
],
|
||
|
"starting_column": 1,
|
||
|
"ending_column": 2
|
||
|
}
|
||
|
},
|
||
|
"signature": "deleteBalance(uint256)"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"type": "struct",
|
||
|
"name": "BalancesStruct",
|
||
|
"source_mapping": {
|
||
4 years ago
|
"start": 228,
|
||
4 years ago
|
"length": 94,
|
||
|
"filename_used": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_relative": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol",
|
||
4 years ago
|
"filename_absolute": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_short": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol",
|
||
4 years ago
|
"is_dependency": false,
|
||
|
"lines": [
|
||
|
17,
|
||
|
18,
|
||
|
19,
|
||
|
20
|
||
|
],
|
||
|
"starting_column": 5,
|
||
|
"ending_column": 6
|
||
|
},
|
||
|
"type_specific_fields": {
|
||
|
"parent": {
|
||
|
"type": "contract",
|
||
|
"name": "Balances",
|
||
|
"source_mapping": {
|
||
4 years ago
|
"start": 199,
|
||
|
"length": 866,
|
||
4 years ago
|
"filename_used": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_relative": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol",
|
||
4 years ago
|
"filename_absolute": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_short": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol",
|
||
4 years ago
|
"is_dependency": false,
|
||
|
"lines": [
|
||
|
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,
|
||
4 years ago
|
43,
|
||
|
44
|
||
4 years ago
|
],
|
||
|
"starting_column": 1,
|
||
|
"ending_column": 2
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"type": "node",
|
||
|
"name": "delete stackBalance[idx]",
|
||
|
"source_mapping": {
|
||
4 years ago
|
"start": 701,
|
||
4 years ago
|
"length": 24,
|
||
|
"filename_used": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_relative": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol",
|
||
4 years ago
|
"filename_absolute": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_short": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol",
|
||
4 years ago
|
"is_dependency": false,
|
||
|
"lines": [
|
||
4 years ago
|
31
|
||
4 years ago
|
],
|
||
|
"starting_column": 9,
|
||
|
"ending_column": 33
|
||
|
},
|
||
|
"type_specific_fields": {
|
||
|
"parent": {
|
||
|
"type": "function",
|
||
|
"name": "deleteBalance",
|
||
|
"source_mapping": {
|
||
4 years ago
|
"start": 595,
|
||
4 years ago
|
"length": 137,
|
||
|
"filename_used": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_relative": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol",
|
||
4 years ago
|
"filename_absolute": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_short": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol",
|
||
4 years ago
|
"is_dependency": false,
|
||
|
"lines": [
|
||
|
29,
|
||
|
30,
|
||
4 years ago
|
31,
|
||
|
32
|
||
4 years ago
|
],
|
||
|
"starting_column": 5,
|
||
|
"ending_column": 6
|
||
|
},
|
||
|
"type_specific_fields": {
|
||
|
"parent": {
|
||
|
"type": "contract",
|
||
|
"name": "Balances",
|
||
|
"source_mapping": {
|
||
4 years ago
|
"start": 199,
|
||
|
"length": 866,
|
||
4 years ago
|
"filename_used": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_relative": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol",
|
||
4 years ago
|
"filename_absolute": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_short": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol",
|
||
4 years ago
|
"is_dependency": false,
|
||
|
"lines": [
|
||
|
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,
|
||
4 years ago
|
43,
|
||
|
44
|
||
4 years ago
|
],
|
||
|
"starting_column": 1,
|
||
|
"ending_column": 2
|
||
|
}
|
||
|
},
|
||
|
"signature": "deleteBalance(uint256)"
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
],
|
||
4 years ago
|
"description": "Balances.deleteBalance(uint256) (tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol#29-32) deletes Balances.BalancesStruct (tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol#17-20) which contains a mapping:\n\t-delete stackBalance[idx] (tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol#31)\n",
|
||
|
"markdown": "[Balances.deleteBalance(uint256)](tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol#L29-L32) deletes [Balances.BalancesStruct](tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol#L17-L20) which contains a mapping:\n\t-[delete stackBalance[idx]](tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol#L31)\n",
|
||
|
"id": "22a793185576322b937d4887f31b8cb0b7c1cef90dde52abceb5ce57918267ec",
|
||
4 years ago
|
"check": "mapping-deletion",
|
||
|
"impact": "Medium",
|
||
|
"confidence": "High"
|
||
|
}
|
||
|
]
|
||
|
]
|