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.
23 lines
396 B
23 lines
396 B
6 years ago
|
contract C{
|
||
|
|
||
|
address addr = 0x41;
|
||
|
|
||
|
bytes4 func_id;
|
||
|
|
||
|
function bad_delegate_call(bytes data){
|
||
|
addr.delegatecall(data);
|
||
|
}
|
||
|
|
||
|
function set(bytes4 id){
|
||
|
func_id = id;
|
||
|
}
|
||
|
|
||
|
function bad_delegate_call2(bytes data){
|
||
|
addr.delegatecall(func_id, data);
|
||
|
}
|
||
|
|
||
|
function good_delegate_call(bytes data){
|
||
|
addr.delegatecall(bytes4(0x41), data);
|
||
|
}
|
||
|
}
|