newPlayers
array can contain address(0) which will make the user pay more to bypass this require(msg.value == entranceFee * newPlayers.length, "PuppyRaffle: Must send enough to enter raffle");
In the payable function enterRaffle
we have 1 parameter which is address[] memory newPlayers
. The first line of the function is require(msg.value == entranceFee * newPlayers.length, "PuppyRaffle: Must send enough to enter raffle");
. If there is an address(0) in the array the user will have to pay more eth to bypass the require.
Enforce the user to may more than he should.
Manual Review, Foundry
Added the following test case:
Result:
Add address(0) check in the for loop
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.