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.
322 lines
16 KiB
322 lines
16 KiB
3 years ago
|
[
|
||
|
[
|
||
|
{
|
||
|
"elements": [
|
||
|
{
|
||
|
"type": "function",
|
||
|
"name": "bad",
|
||
|
"source_mapping": {
|
||
|
"start": 61,
|
||
|
"length": 179,
|
||
|
"filename_used": "/GENERIC_PATH",
|
||
|
"filename_relative": "tests/detectors/msg-value-loop/0.8.0/msg_value_loop.sol",
|
||
|
"filename_absolute": "/GENERIC_PATH",
|
||
|
"filename_short": "tests/detectors/msg-value-loop/0.8.0/msg_value_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": 511,
|
||
|
"filename_used": "/GENERIC_PATH",
|
||
|
"filename_relative": "tests/detectors/msg-value-loop/0.8.0/msg_value_loop.sol",
|
||
|
"filename_absolute": "/GENERIC_PATH",
|
||
|
"filename_short": "tests/detectors/msg-value-loop/0.8.0/msg_value_loop.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
|
||
|
],
|
||
|
"starting_column": 1,
|
||
|
"ending_column": 0
|
||
|
}
|
||
|
},
|
||
|
"signature": "bad(address[])"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"type": "node",
|
||
|
"name": "balances[receivers[i]] += msg.value",
|
||
|
"source_mapping": {
|
||
|
"start": 188,
|
||
|
"length": 35,
|
||
|
"filename_used": "/GENERIC_PATH",
|
||
|
"filename_relative": "tests/detectors/msg-value-loop/0.8.0/msg_value_loop.sol",
|
||
|
"filename_absolute": "/GENERIC_PATH",
|
||
|
"filename_short": "tests/detectors/msg-value-loop/0.8.0/msg_value_loop.sol",
|
||
|
"is_dependency": false,
|
||
|
"lines": [
|
||
|
7
|
||
|
],
|
||
|
"starting_column": 13,
|
||
|
"ending_column": 48
|
||
|
},
|
||
|
"type_specific_fields": {
|
||
|
"parent": {
|
||
|
"type": "function",
|
||
|
"name": "bad",
|
||
|
"source_mapping": {
|
||
|
"start": 61,
|
||
|
"length": 179,
|
||
|
"filename_used": "/GENERIC_PATH",
|
||
|
"filename_relative": "tests/detectors/msg-value-loop/0.8.0/msg_value_loop.sol",
|
||
|
"filename_absolute": "/GENERIC_PATH",
|
||
|
"filename_short": "tests/detectors/msg-value-loop/0.8.0/msg_value_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": 511,
|
||
|
"filename_used": "/GENERIC_PATH",
|
||
|
"filename_relative": "tests/detectors/msg-value-loop/0.8.0/msg_value_loop.sol",
|
||
|
"filename_absolute": "/GENERIC_PATH",
|
||
|
"filename_short": "tests/detectors/msg-value-loop/0.8.0/msg_value_loop.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
|
||
|
],
|
||
|
"starting_column": 1,
|
||
|
"ending_column": 0
|
||
|
}
|
||
|
},
|
||
|
"signature": "bad(address[])"
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
"description": "C.bad(address[]) (tests/detectors/msg-value-loop/0.8.0/msg_value_loop.sol#5-9) use msg.value in a loop: balances[receivers[i]] += msg.value (tests/detectors/msg-value-loop/0.8.0/msg_value_loop.sol#7)\n",
|
||
|
"markdown": "[C.bad(address[])](tests/detectors/msg-value-loop/0.8.0/msg_value_loop.sol#L5-L9) use msg.value in a loop: [balances[receivers[i]] += msg.value](tests/detectors/msg-value-loop/0.8.0/msg_value_loop.sol#L7)\n",
|
||
|
"first_markdown_element": "tests/detectors/msg-value-loop/0.8.0/msg_value_loop.sol#L5-L9",
|
||
|
"id": "0051349cec04c37ffe5ac2f85a2dbbd4a567f5194c16278745de3b12a1c86cb9",
|
||
|
"check": "msg-value-loop",
|
||
|
"impact": "High",
|
||
|
"confidence": "Medium"
|
||
|
},
|
||
|
{
|
||
|
"elements": [
|
||
|
{
|
||
|
"type": "function",
|
||
|
"name": "bad2",
|
||
|
"source_mapping": {
|
||
|
"start": 246,
|
||
|
"length": 172,
|
||
|
"filename_used": "/GENERIC_PATH",
|
||
|
"filename_relative": "tests/detectors/msg-value-loop/0.8.0/msg_value_loop.sol",
|
||
|
"filename_absolute": "/GENERIC_PATH",
|
||
|
"filename_short": "tests/detectors/msg-value-loop/0.8.0/msg_value_loop.sol",
|
||
|
"is_dependency": false,
|
||
|
"lines": [
|
||
|
11,
|
||
|
12,
|
||
|
13,
|
||
|
14,
|
||
|
15
|
||
|
],
|
||
|
"starting_column": 5,
|
||
|
"ending_column": 6
|
||
|
},
|
||
|
"type_specific_fields": {
|
||
|
"parent": {
|
||
|
"type": "contract",
|
||
|
"name": "C",
|
||
|
"source_mapping": {
|
||
|
"start": 0,
|
||
|
"length": 511,
|
||
|
"filename_used": "/GENERIC_PATH",
|
||
|
"filename_relative": "tests/detectors/msg-value-loop/0.8.0/msg_value_loop.sol",
|
||
|
"filename_absolute": "/GENERIC_PATH",
|
||
|
"filename_short": "tests/detectors/msg-value-loop/0.8.0/msg_value_loop.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
|
||
|
],
|
||
|
"starting_column": 1,
|
||
|
"ending_column": 0
|
||
|
}
|
||
|
},
|
||
|
"signature": "bad2(address[])"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"type": "node",
|
||
|
"name": "bad2_internal(receivers[i])",
|
||
|
"source_mapping": {
|
||
|
"start": 374,
|
||
|
"length": 27,
|
||
|
"filename_used": "/GENERIC_PATH",
|
||
|
"filename_relative": "tests/detectors/msg-value-loop/0.8.0/msg_value_loop.sol",
|
||
|
"filename_absolute": "/GENERIC_PATH",
|
||
|
"filename_short": "tests/detectors/msg-value-loop/0.8.0/msg_value_loop.sol",
|
||
|
"is_dependency": false,
|
||
|
"lines": [
|
||
|
13
|
||
|
],
|
||
|
"starting_column": 13,
|
||
|
"ending_column": 40
|
||
|
},
|
||
|
"type_specific_fields": {
|
||
|
"parent": {
|
||
|
"type": "function",
|
||
|
"name": "bad2",
|
||
|
"source_mapping": {
|
||
|
"start": 246,
|
||
|
"length": 172,
|
||
|
"filename_used": "/GENERIC_PATH",
|
||
|
"filename_relative": "tests/detectors/msg-value-loop/0.8.0/msg_value_loop.sol",
|
||
|
"filename_absolute": "/GENERIC_PATH",
|
||
|
"filename_short": "tests/detectors/msg-value-loop/0.8.0/msg_value_loop.sol",
|
||
|
"is_dependency": false,
|
||
|
"lines": [
|
||
|
11,
|
||
|
12,
|
||
|
13,
|
||
|
14,
|
||
|
15
|
||
|
],
|
||
|
"starting_column": 5,
|
||
|
"ending_column": 6
|
||
|
},
|
||
|
"type_specific_fields": {
|
||
|
"parent": {
|
||
|
"type": "contract",
|
||
|
"name": "C",
|
||
|
"source_mapping": {
|
||
|
"start": 0,
|
||
|
"length": 511,
|
||
|
"filename_used": "/GENERIC_PATH",
|
||
|
"filename_relative": "tests/detectors/msg-value-loop/0.8.0/msg_value_loop.sol",
|
||
|
"filename_absolute": "/GENERIC_PATH",
|
||
|
"filename_short": "tests/detectors/msg-value-loop/0.8.0/msg_value_loop.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
|
||
|
],
|
||
|
"starting_column": 1,
|
||
|
"ending_column": 0
|
||
|
}
|
||
|
},
|
||
|
"signature": "bad2(address[])"
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
"description": "C.bad2(address[]) (tests/detectors/msg-value-loop/0.8.0/msg_value_loop.sol#11-15) use msg.value in a loop: bad2_internal(receivers[i]) (tests/detectors/msg-value-loop/0.8.0/msg_value_loop.sol#13)\n",
|
||
|
"markdown": "[C.bad2(address[])](tests/detectors/msg-value-loop/0.8.0/msg_value_loop.sol#L11-L15) use msg.value in a loop: [bad2_internal(receivers[i])](tests/detectors/msg-value-loop/0.8.0/msg_value_loop.sol#L13)\n",
|
||
|
"first_markdown_element": "tests/detectors/msg-value-loop/0.8.0/msg_value_loop.sol#L11-L15",
|
||
|
"id": "36cc43f938a3f57751ebb390fb30f8cc20a3f80634af3bab797d6b97feadf103",
|
||
|
"check": "msg-value-loop",
|
||
|
"impact": "High",
|
||
|
"confidence": "Medium"
|
||
|
}
|
||
|
]
|
||
|
]
|