getActivePlayerIndex() returns 0 both for the player at index 0 and for any address that is not in the raffle. Callers (and the refund() flow, which takes an index from this function) cannot distinguish "first player" from "not a player".
Likelihood: High — anyone calling this function with a non-player address gets the misleading 0.
Impact: Low — no funds are directly at risk, but integrations relying on this function can target the wrong index (e.g. a non-player looking up their index gets 0, the first player's slot).
The test enters one player (index 0) and shows that a non-player address returns the exact same value, 0.
Return a sentinel (e.g. type(uint256).max) or revert when the player is not found, so "not found" can never be confused with a valid index.
The contest is live. Earn rewards by submitting a finding.
Submissions are being reviewed by our AI judge. Results will be available in a few minutes.
View all submissionsThe contest is complete and the rewards are being distributed.