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

Function 'getActivePlayerIndex' returns ambiguous results

Summary

Ambiguous result

Vulnerability Details

Function 'getActivePlayerIndex' returns 0 for both zeroth player and for non-existing player.

Impact

If the function is called with the address that is stored at index 0 the result would be zero - the same as if the function is called with any address that is not stored in the 'players' array.

Tools Used

Manual review

Recommendations

Return -1 for non-existing player.

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.