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

Function 'getActivePlayerIndex' does not check for address(0)

Summary

Function 'getActivePlayerIndex' does not check for address(0)

Vulnerability Details

Function 'getActivePlayerIndex' does not check for address(0) thus allowing address(0) to be searched for within 'players' array.

Impact

Depending on which addresses previously called 'refund' function (which leaves behind address(0) in the 'player' address), the 'getActivePlayerIndex' function would return different results -> the first occurrence of address(0) in the 'players' array.

Tools Used

Recommendations

Validate the input against address(0)

Updates

Lead Judging Commences

Hamiltonite Lead Judge almost 2 years ago
Submission Judgement Published
Validated
Assigned finding tags:

getActivePlayerIndex can say a player is both entered at slot 0 and inactive

Support

FAQs

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