diff --git a/audit_engine/smart_contracts/reentrancy/40499.sol b/audit_engine/smart_contracts/reentrancy/40499.sol new file mode 100644 index 0000000..0d1bc08 --- /dev/null +++ b/audit_engine/smart_contracts/reentrancy/40499.sol @@ -0,0 +1,15 @@ + +contract Wallet { + + + mapping (address => uint) m_txs; + + function confirm(address _h, uint value, byte data) returns (bool) { + if (m_txs[_h] != 0) { + _h.call.value(value)(data); + m_txs[_h] -= value; + return true; + } + } +} + diff --git a/audit_engine/smart_contracts/reentrancy/40732.sol b/audit_engine/smart_contracts/reentrancy/40732.sol new file mode 100644 index 0000000..d3b24ec --- /dev/null +++ b/audit_engine/smart_contracts/reentrancy/40732.sol @@ -0,0 +1,10 @@ + +contract Bank{ + + mapping (address => uint256) public balances; + + function withdraw() { + require(msg.sender.call.value(balances[msg.sender])()); + balances[msg.sender] = 0; + } +} diff --git a/audit_engine/smart_contracts/reentrancy/40735.sol b/audit_engine/smart_contracts/reentrancy/40735.sol new file mode 100644 index 0000000..ff7d4a8 --- /dev/null +++ b/audit_engine/smart_contracts/reentrancy/40735.sol @@ -0,0 +1,13 @@ + +contract dumbDAO { + + mapping (address => uint) public balances; + + function withdraw(address _recipient) returns (bool) { + + if (_recipient.call.value(balances[msg.sender])()) { + balances[msg.sender] = 0; + return true; + } + } +} diff --git a/audit_engine/smart_contracts/reentrancy/40736.sol b/audit_engine/smart_contracts/reentrancy/40736.sol new file mode 100644 index 0000000..cb515ef --- /dev/null +++ b/audit_engine/smart_contracts/reentrancy/40736.sol @@ -0,0 +1,14 @@ + +contract EtherStore { + + uint256 public withdrawalLimit = 1 ether; + mapping(address => uint256) public balances; + + function withdrawFunds (uint256 _weiToWithdraw) public { + require(balances[msg.sender] >= _weiToWithdraw); + require(_weiToWithdraw <= withdrawalLimit); + require(msg.sender.call.value(_weiToWithdraw)()); + balances[msg.sender] -= _weiToWithdraw; + } +} + diff --git a/audit_engine/smart_contracts/reentrancy/40742.sol b/audit_engine/smart_contracts/reentrancy/40742.sol new file mode 100644 index 0000000..267cffd --- /dev/null +++ b/audit_engine/smart_contracts/reentrancy/40742.sol @@ -0,0 +1,10 @@ + +contract SendBalance { + + mapping (address => uint) userBalances ; + + function withdrawBalance() { + if (!(msg.sender.call.value(userBalances[msg.sender])())) { throw ; } + userBalances[msg.sender] = 0; + } +} diff --git a/audit_engine/smart_contracts/reentrancy/40745.sol b/audit_engine/smart_contracts/reentrancy/40745.sol new file mode 100644 index 0000000..6c35b5d --- /dev/null +++ b/audit_engine/smart_contracts/reentrancy/40745.sol @@ -0,0 +1,12 @@ + +contract SimpleDAO { + + mapping (address => uint) public credit; + + function withdraw(uint amount) { + if (credit[msg.sender] >= amount) { + msg.sender.call.value(amount)(); + credit[msg.sender] -= amount; + } + } +} \ No newline at end of file diff --git a/audit_engine/smart_contracts/reentrancy/40746.sol b/audit_engine/smart_contracts/reentrancy/40746.sol new file mode 100644 index 0000000..10d9759 --- /dev/null +++ b/audit_engine/smart_contracts/reentrancy/40746.sol @@ -0,0 +1,12 @@ + +contract Victim { + + mapping(address => uint) public balances; + + function withdraw(uint _amount) public { + if(balances[msg.sender] >= _amount) { + if(!msg.sender.call.value(_amount)()) { throw; } + balances[msg.sender] -= _amount; + } + } +} diff --git a/audit_engine/smart_contracts/reentrancy/40747.sol b/audit_engine/smart_contracts/reentrancy/40747.sol new file mode 100644 index 0000000..9065394 --- /dev/null +++ b/audit_engine/smart_contracts/reentrancy/40747.sol @@ -0,0 +1,15 @@ + +contract PIGGY_BANK { + + mapping (address => uint) public Accounts; + uint public MinSum = 1 ether; + uint putBlock; + + function Collect(uint _am) public payable { + if(Accounts[msg.sender] >= MinSum && _am <= Accounts[msg.sender]) { + if(msg.sender.call.value(_am)()) { + Accounts[msg.sender] -= _am; + } + } + } +} \ No newline at end of file diff --git a/audit_engine/smart_contracts/reentrancy/40748.sol b/audit_engine/smart_contracts/reentrancy/40748.sol new file mode 100644 index 0000000..854a406 --- /dev/null +++ b/audit_engine/smart_contracts/reentrancy/40748.sol @@ -0,0 +1,10 @@ + +contract BancorBuyer { + + mapping(address => uint256) public balances; + + function buyOne(address _exchange, uint256 _value, bytes _data) payable public { + require(_exchange.call.value(_value)(_data)); + balances[msg.sender] = balances[msg.sender] - _value; + } +} \ No newline at end of file diff --git a/audit_engine/smart_contracts/reentrancy/40749.sol b/audit_engine/smart_contracts/reentrancy/40749.sol new file mode 100644 index 0000000..48b86a7 --- /dev/null +++ b/audit_engine/smart_contracts/reentrancy/40749.sol @@ -0,0 +1,10 @@ + +contract Bank{ + + mapping (address => uint256) public balances; + + function withdraw(){ + require(msg.sender.call.value(balances[msg.sender])()); + balances[msg.sender] = 0; + } +} \ No newline at end of file