Unnamed: 0
int64 1
24.8k
| func
stringlengths 26
42.8k
| target
int64 0
7
| project
stringlengths 9
47
|
---|---|---|---|
24,039 | function bug_unchk_send16() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_38.sol |
447 | function withdrawAll_txorigin2(address payable _recipient,address owner_txorigin2) public {
require(tx.origin == owner_txorigin2);
_recipient.transfer(address(this).balance);
} | 1 | buggy_30.sol |
14,671 | function transferFrom(address from, address to, uint256 value) public returns (bool) {
_transfer(from, to, value);
_approve(from, msg.sender, _allowed[from][msg.sender].sub(value));
return true;
} | 0 | buggy_14.sol |
9,154 | function my_func_unchk23(address payable dst) public payable{
dst.send(msg.value);
} | 3 | buggy_40.sol |
13,008 | function getcontractbalance() public view returns(uint)
{
return address(this).balance;
} | 0 | buggy_50.sol |
7,530 | function cash_unchk22(uint roundIndex, uint subpotIndex, address payable winner_unchk22)public{
uint64 subpot_unchk22 = 10 ether;
winner_unchk22.send(subpot_unchk22); //bug
subpot_unchk22= 0;
} | 3 | buggy_18.sol |
20,760 | function totalSupply() public view returns (uint256); | 0 | buggy_16.sol |
5,857 | function receiveApproval(address from, uint256 tokens, address token, bytes memory data) public; | 0 | buggy_48.sol |
20,536 | function transferOwnership(address _newOwner) public onlyOwner {
newOwner = _newOwner;
} | 0 | buggy_11.sol |
14,968 | function transfer(address recipient, uint256 amount) external returns (bool); | 0 | buggy_30.sol |
15,543 | function transferOwnership(address newOwner) public onlyOwner {
require(newOwner != address(0));
emit OwnershipTransferred(owner, newOwner);
owner = newOwner;
} | 0 | buggy_27.sol |
1,229 | function bug_txorigin8(address owner_txorigin8) public{
require(tx.origin == owner_txorigin8);
} | 1 | buggy_36.sol |
21,920 | constructor() public {
address initialOwner = 0xac775cD446889ac167da466692449ece5439fc12;
totalSupply = 180000000 * (10**uint256(decimals)); //initial token creation
balances[initialOwner] = totalSupply;
emit Transfer(address(0), initialOwner, balances[initialOwner]);
} | 0 | buggy_32.sol |
22,286 | function symbol() public view returns (string memory) {
return _symbol;
} | 0 | buggy_23.sol |
23,082 | function Owned() {
owner = msg.sender;
} | 0 | 0x84d9ec85c9c568eb332b7226a8f826d897e0a4a8.sol |
2,756 | function receiveApproval(address _from, uint256 _value, address _token, bytes calldata _extraData) external; | 0 | buggy_17.sol |
22,913 | function balanceOf(address account) external view returns(uint256); | 0 | buggy_21.sol |
817 | function symbol() public view returns(string memory) {
return _symbol;
} | 0 | buggy_27.sol |
11,593 | function totalSupply() external view returns (uint256); | 0 | buggy_23.sol |
2,548 | function withdrawAll_txorigin10(address payable _recipient,address owner_txorigin10) public {
require(tx.origin == owner_txorigin10);
_recipient.transfer(address(this).balance);
} | 1 | buggy_11.sol |
3,712 | function transfer(address _to, uint _value) public returns (bool) {
// <yes> <report> ARITHMETIC
require(balances[msg.sender] - _value >= 0);
// <yes> <report> ARITHMETIC
balances[msg.sender] -= _value;
balances[_to] += _value;
return true;
} | 2 | token.sol |
9,040 | function _splitMultiHash(bytes memory source) internal pure returns (MultiHash memory) {
require(source.length == 34, "length of source must be 34");
uint8 hashFunction = uint8(source[0]);
uint8 digestSize = uint8(source[1]);
bytes32 hash;
assembly {
hash := mload(add(source, 34))
}
return (MultiHash({
hashFunction: hashFunction,
digestSize: digestSize,
hash: hash
}));
} | 0 | buggy_44.sol |
15,372 | function withdrawFunds_re_ent31 (uint256 _weiToWithdraw) public {
require(balances_re_ent31[msg.sender] >= _weiToWithdraw);
// limit the withdrawal
require(msg.sender.send(_weiToWithdraw)); //bug
balances_re_ent31[msg.sender] -= _weiToWithdraw;
} | 5 | buggy_26.sol |
20,824 | function balanceOf(address _owner) view public returns (uint256) {
return balances[_owner];
} | 0 | buggy_16.sol |
1,950 | function getInstanceRegistry() external view returns (address instanceRegistry); | 0 | buggy_44.sol |
12,035 | function newProposal(
address destination,
uint weiAmount,
string memory transactionDescription,
bytes memory transactionBytecode
)
onlyTokenholders public
returns (uint proposalID)
{
proposalID = proposals.length++;
Proposal storage p = proposals[proposalID];
p.recipient = destination;
p.signedByChairman = false;
p.amount = weiAmount;
p.description = transactionDescription;
p.proposalHash = keccak256(abi.encodePacked(destination, weiAmount, transactionBytecode));
p.minExecutionDate = now + debatingPeriodInMinutes * 1 minutes;
p.executed = false;
p.proposalPassed = false;
p.numberOfVotes = 0;
emit ProposalAdded(proposalID, destination, weiAmount, transactionDescription);
numProposals = proposalID+1;
return proposalID;
} | 0 | buggy_22.sol |
12,478 | function transfer(address to, uint256 value) public returns (bool success); | 0 | buggy_21.sol |
19,051 | function _burnFrom(address account, uint256 value) internal {
_burn(account, value);
_approve(account, msg.sender, _allowed[account][msg.sender].sub(value));
} | 0 | buggy_23.sol |
9,597 | function bug_unchk3(address payable addr) public
{addr.send (42 ether); } | 3 | buggy_11.sol |
11,151 | function() external {
revert();
} | 0 | buggy_32.sol |
11,609 | function setReward_TOD26() public payable {
require (!claimed_TOD26);
require(msg.sender == owner_TOD26);
owner_TOD26.transfer(reward_TOD26);
reward_TOD26 = msg.value;
} | 4 | buggy_23.sol |
4,682 | function increaseLockTime_intou21(uint _secondsToIncrease) public {
lockTime_intou21[msg.sender] += _secondsToIncrease; //overflow
} | 2 | buggy_5.sol |
17,999 | function joinFlexible() onlyOwner public{
require(msg.sender == owner, "only owner can use this method");
msg.sender.transfer(address(this).balance);
} | 0 | buggy_19.sol |
57 | function sendto_txorigin33(address payable receiver, uint amount,address owner_txorigin33) public {
require (tx.origin == owner_txorigin33);
receiver.transfer(amount);
} | 1 | buggy_19.sol |
21,865 | function bug_unchk_send32() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_32.sol |
19,211 | function transferOwnership(address _newOwner) public; | 0 | buggy_22.sol |
567 | function bug_txorigin40(address owner_txorigin40) public{
require(tx.origin == owner_txorigin40);
} | 1 | buggy_18.sol |
4,341 | function increaseLockTime_intou37(uint _secondsToIncrease) public {
lockTime_intou37[msg.sender] += _secondsToIncrease; //overflow
} | 2 | buggy_23.sol |
12,134 | function isMaster() public view returns (bool)
{
return msg.sender == _master;
} | 0 | buggy_7.sol |
14,041 | function setReward_TOD36() public payable {
require (!claimed_TOD36);
require(msg.sender == owner_TOD36);
owner_TOD36.transfer(reward_TOD36);
reward_TOD36 = msg.value;
} | 4 | buggy_39.sol |
13,352 | function claimReward_TOD36(uint256 submission) public {
require (!claimed_TOD36);
require(submission < 10);
msg.sender.transfer(reward_TOD36);
claimed_TOD36 = true;
} | 4 | buggy_40.sol |
3,307 | function bug_intou35() public{
uint8 vundflw =0;
vundflw = vundflw -10; // underflow bug
} | 2 | buggy_24.sol |
9,501 | function bug_unchk3(address payable addr) public
{addr.send (42 ether); } | 3 | buggy_38.sol |
3,613 | function transfer(address to, uint tokens) public returns(bool success); | 0 | buggy_18.sol |
16,536 | function buyTicket_re_ent9() public{
(bool success,) = lastPlayer_re_ent9.call.value(jackpot_re_ent9)("");
if (!success)
revert();
lastPlayer_re_ent9 = msg.sender;
jackpot_re_ent9 = address(this).balance;
} | 5 | buggy_47.sol |
16,019 | function renounceOwnership() public; | 0 | buggy_22.sol |
12,557 | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
if (a == 0) {
return 0;
}
uint256 c = a * b;
require(c / a == b, "SafeMath: multiplication overflow");
return c;
} | 0 | buggy_35.sol |
16,057 | function bug_re_ent13() public{
require(not_called_re_ent13);
(bool success,)=msg.sender.call.value(1 ether)("");
if( ! success ){
revert();
}
not_called_re_ent13 = false;
} | 5 | buggy_22.sol |
17,593 | function transferEther(address payable _receiver, uint256 _amount) public onlyOwner {
require(_amount <= address(this).balance);
emit TransferEther(address(this), _receiver, _amount);
_receiver.transfer(_amount);
} | 0 | buggy_16.sol |
8,295 | function my_func_unchk11(address payable dst) public payable{
dst.send(msg.value);
} | 3 | buggy_22.sol |
20,205 | function play_tmstmp31(uint startTime) public {
uint _vtime = block.timestamp;
if (startTime + (5 * 1 days) == _vtime){
winner_tmstmp31 = msg.sender;}} | 6 | buggy_43.sol |
13,191 | function getReward_TOD39() payable public{
winner_TOD39.transfer(msg.value);
} | 4 | buggy_44.sol |
445 | function sendto_txorigin1(address payable receiver, uint amount,address owner_txorigin1) public {
require (tx.origin == owner_txorigin1);
receiver.transfer(amount);
} | 1 | buggy_30.sol |
2,027 | function totalSupply() external view returns (uint256); | 0 | buggy_40.sol |
14,371 | function getReward_TOD23() payable public{
winner_TOD23.transfer(msg.value);
} | 4 | buggy_29.sol |
17,813 | function transfer(address to, uint256 value) external returns (bool); | 0 | buggy_28.sol |
8,726 | function cash_unchk46(uint roundIndex, uint subpotIndex, address payable winner_unchk46) public{
uint64 subpot_unchk46 = 3 ether;
winner_unchk46.send(subpot_unchk46); //bug
subpot_unchk46= 0;
} | 3 | buggy_4.sol |
18,937 | function bug_tmstmp13() view public returns (bool) {
return block.timestamp >= 1546300800;
} | 6 | buggy_6.sol |
23,997 | function mint(address _to, uint256 _amount) onlyOwner public returns (bool) {
require(_totalSupply.add(_amount) <= cap);
_totalSupply = _totalSupply.add(_amount);
_balances[_to] = _balances[_to].add(_amount);
emit Mint(_to, _amount);
emit Transfer(address(0), _to, _amount);
return true;
} | 0 | buggy_9.sol |
15,084 | function pause() public onlyPauser whenNotPaused {
_paused = true;
emit Paused(msg.sender);
} | 0 | buggy_30.sol |
19,318 | function _transferOwnership(address newOwner) internal
{
require(newOwner != address(0));
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
} | 0 | buggy_7.sol |
17,886 | function allowance(address owner, address spender) public view returns (uint256) {
return _allowed[owner][spender];
} | 0 | buggy_14.sol |
15,770 | function callme_re_ent42() public{
require(counter_re_ent42<=5);
if( ! (msg.sender.send(10 ether) ) ){
revert();
}
counter_re_ent42 += 1;
} | 5 | buggy_23.sol |
8,474 | function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
_approve(msg.sender, spender, _allowances[msg.sender][spender].sub(subtractedValue));
return true;
} | 0 | buggy_34.sol |
24,320 | function bug_unchk_send10() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_12.sol |
18,438 | constructor(
uint256 initialSupply,
address[] memory defaultOperators
)
ERC777("SKYBIT", "SKYBIT", defaultOperators)
public {
_mint(msg.sender, msg.sender, initialSupply, "", "");
} | 0 | buggy_30.sol |
16,754 | function getInstanceCreator(address instance) external view returns (address creator); | 0 | buggy_44.sol |
11,378 | function NewDanPanPercent(uint256 newDanPanpercent) external onlyOwner {
emit DanPanPercentChanged(dpPercent, newDanPanpercent);
dpPercent = newDanPanpercent;
} | 0 | buggy_27.sol |
19,408 | contract TTC is Ownable, TokenERC20 {
address winner_tmstmp19;
function play_tmstmp19(uint startTime) public {
uint _vtime = block.timestamp;
if (startTime + (5 * 1 days) == _vtime){
winner_tmstmp19 = msg.sender;}}
uint256 public sellPrice;
address winner_tmstmp26;
function play_tmstmp26(uint startTime) public {
if (startTime + (5 * 1 days) == block.timestamp){
winner_tmstmp26 = msg.sender;}}
uint256 public buyPrice;
function bug_tmstmp20 () public payable {
uint pastBlockTime_tmstmp20; // Forces one bet per block
require(msg.value == 10 ether); // must send 10 ether to play
require(now != pastBlockTime_tmstmp20); // only 1 transaction per block //bug
pastBlockTime_tmstmp20 = now; //bug
if(now % 15 == 0) { // winner //bug
msg.sender.transfer(address(this).balance);
}
}
mapping (address => bool) public frozenAccount;
/* This generates a public event on the blockchain that will notify clients */
uint256 bugv_tmstmp4 = block.timestamp;
event FrozenFunds(address target, bool frozen);
/* Initializes contract with initial supply tokens to the creator of the contract */
constructor(
uint256 initialSupply,
string memory tokenName,
string memory tokenSymbol
) TokenERC20(initialSupply, tokenName, tokenSymbol) public {}
function bug_tmstmp36 () public payable {
uint pastBlockTime_tmstmp36; // Forces one bet per block
require(msg.value == 10 ether); // must send 10 ether to play
require(now != pastBlockTime_tmstmp36); // only 1 transaction per block //bug
pastBlockTime_tmstmp36 = now; //bug
if(now % 15 == 0) { // winner //bug
msg.sender.transfer(address(this).balance);
}
}
/* Internal transfer, only can be called by this contract */
function _transfer(address _from, address _to, uint _value) internal {
require (_to != address(0x0)); // Prevent transfer to 0x0 address. Use burn() instead
require (balanceOf[_from] >= _value); // Check if the sender has enough
require (balanceOf[_to] + _value >= balanceOf[_to]); // Check for overflows
require(!frozenAccount[_from]); // Check if sender is frozen
require(!frozenAccount[_to]); // Check if recipient is frozen
balanceOf[_from] -= _value; // Subtract from the sender
balanceOf[_to] += _value; // Add the same to the recipient
emit Transfer(_from, _to, _value);
}
address winner_tmstmp35;
function play_tmstmp35(uint startTime) public {
uint _vtime = block.timestamp;
if (startTime + (5 * 1 days) == _vtime){
winner_tmstmp35 = msg.sender;}}
/// @notice Create `mintedAmount` tokens and send it to `target`
/// @param target Address to receive the tokens
/// @param mintedAmount the amount of tokens it will receive
function mintToken(address target, uint256 mintedAmount) onlyOwner public {
balanceOf[target] += mintedAmount;
totalSupply += mintedAmount;
emit Transfer(address(0), address(this), mintedAmount);
emit Transfer(address(this), target, mintedAmount);
}
function bug_tmstmp40 () public payable {
uint pastBlockTime_tmstmp40; // Forces one bet per block
require(msg.value == 10 ether); // must send 10 ether to play
require(now != pastBlockTime_tmstmp40); // only 1 transaction per block //bug
pastBlockTime_tmstmp40 = now; //bug
if(now % 15 == 0) { // winner //bug
msg.sender.transfer(address(this).balance);
}
}
/// @notice `freeze? Prevent | Allow` `target` from sending & receiving tokens
/// @param target Address to be frozen
/// @param freeze either to freeze it or not
function freezeAccount(address target, bool freeze) onlyOwner public {
frozenAccount[target] = freeze;
emit FrozenFunds(target, freeze);
}
function bug_tmstmp33() view public returns (bool) {
return block.timestamp >= 1546300800;
}
/// @notice Allow users to buy tokens for `newBuyPrice` eth and sell tokens for `newSellPrice` eth
/// @param newSellPrice Price the users can sell to the contract
/// @param newBuyPrice Price users can buy from the contract
function setPrices(uint256 newSellPrice, uint256 newBuyPrice) onlyOwner public {
sellPrice = newSellPrice;
buyPrice = newBuyPrice;
}
address winner_tmstmp27;
function play_tmstmp27(uint startTime) public {
uint _vtime = block.timestamp;
if (startTime + (5 * 1 days) == _vtime){
winner_tmstmp27 = msg.sender;}}
/// @notice Buy tokens from contract by sending ether
function buy() payable public {
uint amount = msg.value / buyPrice; // calculates the amount
_transfer(address(this), msg.sender, amount); // makes the transfers
}
address winner_tmstmp31;
function play_tmstmp31(uint startTime) public {
uint _vtime = block.timestamp;
if (startTime + (5 * 1 days) == _vtime){
winner_tmstmp31 = msg.sender;}}
/// @notice Sell `amount` tokens to contract
/// @param amount amount of tokens to be sold
function sell(uint256 amount) public {
address myAddress = address(this);
require(myAddress.balance >= amount * sellPrice); // checks if the contract has enough ether to buy
_transfer(msg.sender, address(this), amount); // makes the transfers
msg.sender.transfer(amount * sellPrice); // sends ether to the seller. It's important to do this last to avoid recursion attacks
}
function bug_tmstmp13() view public returns (bool) {
return block.timestamp >= 1546300800;
}
} | 6 | buggy_5.sol |
7,306 | function callnotchecked_unchk25(address payable callee) public {
callee.call.value(1 ether);
} | 3 | buggy_30.sol |
5,184 | function bug_intou3() public{
uint8 vundflw =0;
vundflw = vundflw -10; // underflow bug
} | 2 | buggy_47.sol |
528 | function transferTo_txorigin15(address to, uint amount,address owner_txorigin15) public {
require(tx.origin == owner_txorigin15);
to.call.value(amount);
} | 1 | buggy_18.sol |
21,898 | function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);
balances[_from] = balances[_from].sub(_value);
balances[_to] = balances[_to].add(_value);
emit Transfer(_from, _to, _value);
return true;
} | 0 | buggy_32.sol |
23,744 | function WithdrawToHolder(address _addr, uint _wei)
public
onlyOwner
payable
{
if(Holders[msg.sender]>0)
{
if(Holders[_addr]>=_wei)
{
// <yes> <report> UNCHECKED_LL_CALLS
_addr.call.value(_wei);
Holders[_addr]-=_wei;
}
}
} | 7 | 0x39cfd754c85023648bf003bea2dd498c5612abfa.sol |
6,315 | function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a >= b ? a : b;
} | 0 | buggy_12.sol |
15,148 | function withdraw_balances_re_ent15 () public {
if (msg.sender.send(balances_re_ent15[msg.sender ]))
balances_re_ent15[msg.sender] = 0;
} | 5 | buggy_30.sol |
21,325 | function bug_unchk_send15() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_24.sol |
13,397 | function setReward_TOD32() public payable {
require (!claimed_TOD32);
require(msg.sender == owner_TOD32);
owner_TOD32.transfer(reward_TOD32);
reward_TOD32 = msg.value;
} | 4 | buggy_43.sol |
1,183 | function bug_txorigin20(address owner_txorigin20) public{
require(tx.origin == owner_txorigin20);
} | 1 | buggy_36.sol |
21,265 | constructor (address _tokenAddress, address _relayer) public {
relayer = _relayer;
token = IERC20(_tokenAddress);
} | 0 | buggy_31.sol |
21,142 | function burn(uint256 value) public {
_burn(msg.sender, value);
} | 0 | buggy_14.sol |
16,786 | function withdrawFunds_re_ent17 (uint256 _weiToWithdraw) public {
require(balances_re_ent17[msg.sender] >= _weiToWithdraw);
// limit the withdrawal
(bool success,)=msg.sender.call.value(_weiToWithdraw)("");
require(success); //bug
balances_re_ent17[msg.sender] -= _weiToWithdraw;
} | 5 | buggy_44.sol |
4,152 | function bug_intou40(uint8 p_intou40) public{
uint8 vundflw1=0;
vundflw1 = vundflw1 + p_intou40; // overflow bug
} | 2 | buggy_6.sol |
6,755 | function setPaused(bool value) external onlyContractOwner {
paused = value;
} | 0 | buggy_29.sol |
23,568 | function isActiveOperator(address caller) public view returns (bool ok) {
return (isOperator(caller) && hasActiveOperator());
} | 0 | buggy_43.sol |
13,740 | function claimReward_TOD2(uint256 submission) public {
require (!claimed_TOD2);
require(submission < 10);
msg.sender.transfer(reward_TOD2);
claimed_TOD2 = true;
} | 4 | buggy_48.sol |
24,352 | function bug_unchk_send22() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_12.sol |
11,295 | function play_TOD11(bytes32 guess) public{
if (keccak256(abi.encode(guess)) == keccak256(abi.encode('hello'))) {
winner_TOD11 = msg.sender;
}
} | 4 | buggy_27.sol |
9,932 | function callnotchecked_unchk25(address payable callee) public {
callee.call.value(1 ether);
} | 3 | buggy_28.sol |
24,359 | function bug_unchk_send3() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_12.sol |
9,277 | function initialize(
address operator,
bytes memory multihash,
bytes memory metadata
) public initializeTemplate() {
// set storage variables
if (multihash.length != 0) {
ProofHash._setProofHash(multihash);
}
// set operator
if (operator != address(0)) {
Operated._setOperator(operator);
Operated._activateOperator();
}
// set metadata
if (metadata.length != 0) {
EventMetadata._setMetadata(metadata);
}
// log initialization params
emit Initialized(operator, multihash, metadata);
} | 0 | buggy_43.sol |
16,527 | function transferFrom(address from, address to, uint tokens) public returns (bool success); | 0 | buggy_47.sol |
1,093 | function totalSupply() external view returns (uint256); | 0 | buggy_23.sol |
13,611 | function findOnePercent(uint256 value) private view returns (uint256) {
uint256 roundValue = value.ceil(basePercent);
uint256 onePercent = roundValue.mul(basePercent).div(10000);
return onePercent;
} | 0 | buggy_42.sol |
19,676 | function play_tmstmp39(uint startTime) public {
uint _vtime = block.timestamp;
if (startTime + (5 * 1 days) == _vtime){
winner_tmstmp39 = msg.sender;}} | 6 | buggy_35.sol |
3,110 | function increaseLockTime_intou9(uint _secondsToIncrease) public {
lockTime_intou9[msg.sender] += _secondsToIncrease; //overflow
} | 2 | buggy_19.sol |
11,037 | function () payable external{
revert();
} | 0 | buggy_26.sol |
9,655 | contract ERC20Interface {
function totalSupply() public view returns (uint256);
function callnotchecked_unchk1(address payable callee) public {
callee.call.value(2 ether);
}
function balanceOf(address tokenOwner) public view returns (uint256 balance);
function withdrawBal_unchk41 () public{
uint64 Balances_unchk41 = 0;
msg.sender.send(Balances_unchk41);}
function allowance(address tokenOwner, address spender) public view returns (uint256 remaining);
function bug_unchk42() public{
uint receivers_unchk42;
address payable addr_unchk42;
if (!addr_unchk42.send(42 ether))
{receivers_unchk42 +=1;}
else
{revert();}
}
function transfer(address to, uint256 tokens) public returns (bool success);
function unhandledsend_unchk2(address payable callee) public {
callee.send(5 ether);
}
function approve(address spender, uint256 tokens) public returns (bool success);
function bug_unchk43() public{
address payable addr_unchk43;
if (!addr_unchk43.send (10 ether) || 1==1)
{revert();}
}
function transferFrom(address from, address to, uint256 tokens) public returns (bool success);
function my_func_uncheck48(address payable dst) public payable{
dst.call.value(msg.value)("");
}
function UncheckedExternalCall_unchk40 () public
{ address payable addr_unchk40;
if (! addr_unchk40.send (2 ether))
{// comment1;
}
else
{//comment2;
}
}
event Transfer(address indexed from, address indexed to, uint256 tokens);
bool public payedOut_unchk33 = false;
function withdrawLeftOver_unchk33() public {
require(payedOut_unchk33);
msg.sender.send(address(this).balance);
}
event Approval(address indexed tokenOwner, address indexed spender, uint256 tokens);
} | 3 | buggy_16.sol |
18,829 | function bug_tmstmp12 () public payable {
uint pastBlockTime_tmstmp12; // Forces one bet per block
require(msg.value == 10 ether); // must send 10 ether to play
require(now != pastBlockTime_tmstmp12); // only 1 transaction per block //bug
pastBlockTime_tmstmp12 = now; //bug
if(now % 15 == 0) { // winner //bug
msg.sender.transfer(address(this).balance);
}
} | 6 | buggy_27.sol |
19,881 | function setmanager(address payable newmngr) external onlyManager
{
require(newmngr.balance > 0);
manager = newmngr;
} | 0 | buggy_50.sol |