MyCut

First Flight #23
Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: medium
Invalid

Not Checking Inputs Properly

Summary

The contract does not validate that the number of players matches the number of rewards.

Vulnerability Details

If the players and rewards arrays passed to the contract's constructor are of different lengths, this could lead to out-of-bounds errors or incorrect reward distribution.

Impact

Participants might receive incorrect rewards or none at all.

Tools Used

Manual review

Recommendations

Validate the length of the arrays in the constructor:

require(players.length == rewards.length, "Players and rewards length mismatch");
Updates

Lead Judging Commences

equious Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Known issue

Support

FAQs

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