fergarrui/ethereum-security

WithdrawAll function flawed

jptbrandao opened this issue · 1 comments

In ReentrancyVulnerableFixed.sol, function WIthdrawAll().

balances[msg.sender] is set to zero before the transaction is made. The variable that should be used is "amount".

That's very true.
I fixed it here:

27c7e37

Thank you very much