DateTime.isValidMarketMaturity can be called with a maxMarketIndex < 10 but the inner DateTime.getTradedMarket(i) function will revert for any values i > 7.
Impact
"Valid" maxMarketIndex values above 7 will break and return with an error.
Recommended Mitigation Steps
The upper bound on maxMarketIndex should be set to 7.
Handle
cmichel
Vulnerability details
Vulnerability Details
DateTime.isValidMarketMaturity
can be called with amaxMarketIndex < 10
but the innerDateTime.getTradedMarket(i)
function will revert for any valuesi > 7
.Impact
"Valid"
maxMarketIndex
values above 7 will break and return with an error.Recommended Mitigation Steps
The upper bound on
maxMarketIndex
should be set to7
.