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.7.6/msg_value_loop.sol",
|
||
|
"filename_absolute": "/GENERIC_PATH",
|
||
|
"filename_short": "tests/detectors/msg-value-loop/0.7.6/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.7.6/msg_value_loop.sol",
|
||
|
"filename_absolute": "/GENERIC_PATH",
|
||
|
"filename_short": "tests/detectors/msg-value-loop/0.7.6/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.7.6/msg_value_loop.sol",
|
||
|
"filename_absolute": "/GENERIC_PATH",
|
||
|
"filename_short": "tests/detectors/msg-value-loop/0.7.6/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.7.6/msg_value_loop.sol",
|
||
|
"filename_absolute": "/GENERIC_PATH",
|
||
|
"filename_short": "tests/detectors/msg-value-loop/0.7.6/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.7.6/msg_value_loop.sol",
|
||
|
"filename_absolute": "/GENERIC_PATH",
|
||
|
"filename_short": "tests/detectors/msg-value-loop/0.7.6/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.7.6/msg_value_loop.sol#5-9) use msg.value in a loop: balances[receivers[i]] += msg.value (tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#7)\n",
|
||
|
"markdown": "[C.bad(address[])](tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#L5-L9) use msg.value in a loop: [balances[receivers[i]] += msg.value](tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#L7)\n",
|
||
|
"first_markdown_element": "tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#L5-L9",
|
||
|
"id": "fd0c2f6abecbecd689c995b2cd3c30c9f1bd3763e34f4d5cb91788604f8ec3da",
|
||
|
"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.7.6/msg_value_loop.sol",
|
||
|
"filename_absolute": "/GENERIC_PATH",
|
||
|
"filename_short": "tests/detectors/msg-value-loop/0.7.6/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.7.6/msg_value_loop.sol",
|
||
|
"filename_absolute": "/GENERIC_PATH",
|
||
|
"filename_short": "tests/detectors/msg-value-loop/0.7.6/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.7.6/msg_value_loop.sol",
|
||
|
"filename_absolute": "/GENERIC_PATH",
|
||
|
"filename_short": "tests/detectors/msg-value-loop/0.7.6/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.7.6/msg_value_loop.sol",
|
||
|
"filename_absolute": "/GENERIC_PATH",
|
||
|
"filename_short": "tests/detectors/msg-value-loop/0.7.6/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.7.6/msg_value_loop.sol",
|
||
|
"filename_absolute": "/GENERIC_PATH",
|
||
|
"filename_short": "tests/detectors/msg-value-loop/0.7.6/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.7.6/msg_value_loop.sol#11-15) use msg.value in a loop: bad2_internal(receivers[i]) (tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#13)\n",
|
||
|
"markdown": "[C.bad2(address[])](tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#L11-L15) use msg.value in a loop: [bad2_internal(receivers[i])](tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#L13)\n",
|
||
|
"first_markdown_element": "tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#L11-L15",
|
||
|
"id": "0fec821a1c77be9b94a219d21c9c2795cee09a25271cc47ea1ea68156c9cddff",
|
||
|
"check": "msg-value-loop",
|
||
|
"impact": "High",
|
||
|
"confidence": "Medium"
|
||
|
}
|
||
|
]
|
||
|
]
|