Last active
January 26, 2018 03:04
-
-
Save muellerberndt/ac479f9f4e37356747e904a08ecbfbbb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.18; | |
contract Pwnable { | |
address public owner; | |
address[] a1; | |
function Pwnable() public { | |
owner = msg.sender; | |
a1.length -= 1; | |
} | |
modifier onlyOwner() { | |
require(msg.sender == owner); | |
_; | |
} | |
function fun(uint offset, address addr) public returns (uint) { | |
a1[offset] = addr; | |
} | |
function transferOwnership(address newOwner) public onlyOwner { | |
require(newOwner != address(0)); | |
owner = newOwner; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment