MyCut

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

No Input Validation in createContest function

Summary

The createContest function does not validate that the lengths of the players and rewards arrays are the same.

Vulnerability Details

The function creates a new Pot contract using the players and rewards arrays without ensuring their lengths match, which can lead to incorrect initialization.

Impact

Mismatched array lengths can cause the Pot contract to be initialized with inconsistent data, potentially leading to incorrect or erroneous behavior.

Tools Used

Manual Review

Recommendations

Add validation to ensure that the lengths of players and rewards arrays are equal before creating the Pot contract.

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

Lead Judging Commences

equious Lead Judge 10 months ago
Submission Judgement Published
Invalidated
Reason: Other

Support

FAQs

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