LinearDistributionIntervalDecrease:_calculateMaxEndTime
calculates the maximum possible end time based on given parameters, while LinearDistributionIntervalDecrease:_divideCeil
computes the division of two unsigned integers rounded up to the nearest integer. An overflow scenario is identified in _calculateMaxEndTime where the result of maxInterval \* interval_
could exceed the maximum value representable by auint128
In calculateMaxEndTime, if the product of maxIntervals * interval_ exceeds the maximum value representable by a uint128 (which is 2^128 - 1), the result will wrap around due to overflow. This can lead to incorrect calculations of the maximum end time
when maxIntervals_ * interval_
wrap around due to overflow,result will be lowest positive number,the endTime variable holding value of maxEndTime which can cause erroneous results.
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.