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

Incorrect get active player index

Summary

If active player not find, always return position for first player.

Vulnerability Details

If after call getActivePlayerIndex(address player) player not find, return 0. 0 - index of the first player who participates in the lottery. So if no active player is found, the index of the first player will always be returned.

Impact

Incorrect definition of an active lottery player.

Tools Used

Manual review

Recommendations

Replace return 0 with return -1.

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.