Beginner FriendlyFoundryNFT
100 EXP
View results
Submission Details
Severity: low
Invalid

L-5: Refund function should check if the playedIndex is within the array

Summary

LOW-5: The refund function takes "uint256 playerIndex" as a parameter. The index can however be larger than the current length of the players array.

Vulnerability Details

Accessing an index out of the range of the array length may result in the failure of the transaction.

Impact

User experience

Tools Used

Static analysis, local testing

Recommendations

Add a "require" statement checking that the playerIndex value is smaller than the length of the array.
"require(playerIndex < players.length, "PuppyRaffle: The index is out of scope of the array");"

Updates

Lead Judging Commences

patrickalphac Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Other

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.