The code does not include any checks to ensure that the lengths of these array.
In the provided code, there is a comment stating that the winners and percentages arrays are supposed not to be too long, implying that the loop should remain unbounded. However, the code does not include any checks to ensure that the lengths of these arrays match.
https://github.com/Cyfrin/2023-08-sparkn/blob/main/src/Distributor.sol#L108
The following code snippet illustrates the loop where the issue may arise:
https://github.com/Cyfrin/2023-08-sparkn/blob/main/src/Distributor.sol#L128-L133
The absence of checks to ensure that the lengths of the winners and percentages arrays could result the loop can stay unbounded.
Manual Review
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.