Open code423n4 opened 3 years ago
cmichel
DateTime.getMarketIndex can be called with a maxMarketIndex < 10 but the inner DateTime.getTradedMarket(i) function will revert for any values i > 7.
DateTime.getMarketIndex
maxMarketIndex < 10
DateTime.getTradedMarket(i)
i > 7
"Valid" maxMarketIndex values above 7 will break and return with an error.
maxMarketIndex
The upper bound on maxMarketIndex should be set to 7.
7
Handle
cmichel
Vulnerability details
Vulnerability Details
DateTime.getMarketIndex
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
.