Beginner FriendlyFoundryGameFi
100 EXP
View results
Submission Details
Severity: low
Invalid

`MartenitsaToken::getAllProducers` function faces revert when the `producers` array is very large

Summary

The producers array being extremely large will make the getAllProducers function to revert and the user will not be able to view the producers.

Vulnerability Details

The vulnerability is present in the MartenitsaToken::getAllProducers function where it returns the addresses of the producers in the producers array.
But when the size of producers array is very large then it will not return anything and will only revert.

Impact

The array being very large will make the function revert and return nothing.

Tools Used

Manual Review

Recommendations

Add the startIdx and endIdx parameter to return only the addresses in the given range, such that the difference between endIdx and startIdx is not large than the threshold limit when the function reverts.

Updates

Lead Judging Commences

bube Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Unbounded arrays

shikhar229169 Submitter
over 1 year ago
bube Lead Judge
over 1 year ago
bube Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Unbounded arrays

Support

FAQs

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