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.
151 lines
7.5 KiB
151 lines
7.5 KiB
3 years ago
|
[
|
||
|
[
|
||
|
{
|
||
|
"elements": [
|
||
|
{
|
||
|
"type": "function",
|
||
|
"name": "bad",
|
||
|
"source_mapping": {
|
||
|
"start": 61,
|
||
|
"length": 232,
|
||
|
"filename_used": "/GENERIC_PATH",
|
||
|
"filename_relative": "tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol",
|
||
|
"filename_absolute": "/GENERIC_PATH",
|
||
|
"filename_short": "tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol",
|
||
|
"is_dependency": false,
|
||
|
"lines": [
|
||
|
5,
|
||
|
6,
|
||
|
7,
|
||
|
8,
|
||
|
9
|
||
|
],
|
||
|
"starting_column": 5,
|
||
|
"ending_column": 6
|
||
|
},
|
||
|
"type_specific_fields": {
|
||
|
"parent": {
|
||
|
"type": "contract",
|
||
|
"name": "C",
|
||
|
"source_mapping": {
|
||
|
"start": 0,
|
||
|
"length": 388,
|
||
|
"filename_used": "/GENERIC_PATH",
|
||
|
"filename_relative": "tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol",
|
||
|
"filename_absolute": "/GENERIC_PATH",
|
||
|
"filename_short": "tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol",
|
||
|
"is_dependency": false,
|
||
|
"lines": [
|
||
|
1,
|
||
|
2,
|
||
|
3,
|
||
|
4,
|
||
|
5,
|
||
|
6,
|
||
|
7,
|
||
|
8,
|
||
|
9,
|
||
|
10,
|
||
|
11,
|
||
|
12,
|
||
|
13,
|
||
|
14,
|
||
|
15,
|
||
|
16
|
||
|
],
|
||
|
"starting_column": 1,
|
||
|
"ending_column": 0
|
||
|
}
|
||
|
},
|
||
|
"signature": "bad(address[])"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"type": "node",
|
||
|
"name": "address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))",
|
||
|
"source_mapping": {
|
||
|
"start": 188,
|
||
|
"length": 88,
|
||
|
"filename_used": "/GENERIC_PATH",
|
||
|
"filename_relative": "tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol",
|
||
|
"filename_absolute": "/GENERIC_PATH",
|
||
|
"filename_short": "tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol",
|
||
|
"is_dependency": false,
|
||
|
"lines": [
|
||
|
7
|
||
|
],
|
||
|
"starting_column": 13,
|
||
|
"ending_column": 101
|
||
|
},
|
||
|
"type_specific_fields": {
|
||
|
"parent": {
|
||
|
"type": "function",
|
||
|
"name": "bad",
|
||
|
"source_mapping": {
|
||
|
"start": 61,
|
||
|
"length": 232,
|
||
|
"filename_used": "/GENERIC_PATH",
|
||
|
"filename_relative": "tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol",
|
||
|
"filename_absolute": "/GENERIC_PATH",
|
||
|
"filename_short": "tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol",
|
||
|
"is_dependency": false,
|
||
|
"lines": [
|
||
|
5,
|
||
|
6,
|
||
|
7,
|
||
|
8,
|
||
|
9
|
||
|
],
|
||
|
"starting_column": 5,
|
||
|
"ending_column": 6
|
||
|
},
|
||
|
"type_specific_fields": {
|
||
|
"parent": {
|
||
|
"type": "contract",
|
||
|
"name": "C",
|
||
|
"source_mapping": {
|
||
|
"start": 0,
|
||
|
"length": 388,
|
||
|
"filename_used": "/GENERIC_PATH",
|
||
|
"filename_relative": "tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol",
|
||
|
"filename_absolute": "/GENERIC_PATH",
|
||
|
"filename_short": "tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol",
|
||
|
"is_dependency": false,
|
||
|
"lines": [
|
||
|
1,
|
||
|
2,
|
||
|
3,
|
||
|
4,
|
||
|
5,
|
||
|
6,
|
||
|
7,
|
||
|
8,
|
||
|
9,
|
||
|
10,
|
||
|
11,
|
||
|
12,
|
||
|
13,
|
||
|
14,
|
||
|
15,
|
||
|
16
|
||
|
],
|
||
|
"starting_column": 1,
|
||
|
"ending_column": 0
|
||
|
}
|
||
|
},
|
||
|
"signature": "bad(address[])"
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
"description": "C.bad(address[]) (tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol#5-9) has delegatecall inside a loop in a payable function: address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i])) (tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol#7)\n",
|
||
|
"markdown": "[C.bad(address[])](tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol#L5-L9) has delegatecall inside a loop in a payable function: [address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))](tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol#L7)\n",
|
||
|
"first_markdown_element": "tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol#L5-L9",
|
||
|
"id": "e057dff3814f9be2d5eca53fe80f41323b8ed90d20bb1e33600bb4e043c40b66",
|
||
|
"check": "delegatecall-loop",
|
||
|
"impact": "High",
|
||
|
"confidence": "High"
|
||
|
}
|
||
|
]
|
||
|
]
|