Add SB Curated (copied from the smartbugs repository).
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* @source: etherscan.io
|
||||
* @author: -
|
||||
* @vulnerable_at_lines: 27
|
||||
*/
|
||||
|
||||
pragma solidity ^0.4.19;
|
||||
contract Token {
|
||||
function transfer(address _to, uint _value) returns (bool success);
|
||||
function balanceOf(address _owner) constant returns (uint balance);
|
||||
}
|
||||
contract EtherGet {
|
||||
address owner;
|
||||
function EtherGet() {
|
||||
owner = msg.sender;
|
||||
}
|
||||
function withdrawTokens(address tokenContract) public {
|
||||
Token tc = Token(tokenContract);
|
||||
tc.transfer(owner, tc.balanceOf(this));
|
||||
}
|
||||
function withdrawEther() public {
|
||||
owner.transfer(this.balance);
|
||||
}
|
||||
function getTokens(uint num, address addr) public {
|
||||
for(uint i = 0; i < num; i++){
|
||||
// <yes> <report> UNCHECKED_LL_CALLS
|
||||
addr.call.value(0 wei)();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user