makoto / blockparty

NO BLOCK NO PARTY
MIT License
164 stars 41 forks source link

Fix reentrancy bug #45

Closed makoto closed 7 years ago

makoto commented 7 years ago

This could cause reentrancy bug

    function withdraw() public onlyPayable notPaid {
        Participant participant = participants[msg.sender];
        if (msg.sender.send(participant.payout)) {
            participant.paid = true;
            totalBalance -= participant.payout;
        }
    }
makoto commented 7 years ago

Fixed at https://github.com/makoto/blockparty/pull/47