Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uninitialized state variable detector: remove FP due to delegatecall proxy #370

Merged
merged 1 commit into from
Nov 13, 2019

Conversation

montyly
Copy link
Member

@montyly montyly commented Nov 13, 2019

Fix #178

@montyly
Copy link
Member Author

montyly commented Nov 13, 2019

Example:

// Do not use this code, it is buggy

contract Initializable{}

contract C is Initializable{

    address owner;

    function use_owner() public {
        require(owner == msg.sender);
    }

}

contract Proxy{

    address owner = msg.sender;

    function () external{
        assembly{
            let ret := delegatecall(
                    0,                
                    0,           
                    0,    
                    0,        
                    0,                 
                    0                   
                )
        }
    }

}

C.owner is correctly not detected as an uninitialized variable

@montyly montyly merged commit 83790cd into dev Nov 13, 2019
@montyly montyly deleted the dev-uninitialized-state-delegatecall branch November 13, 2019 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant