Open code423n4 opened 2 years ago
Dravee
Fixed arrays are less expensive than dynamic arrays and would implicitely add the array.length check
https://github.com/code-423n4/2022-01-insure/blob/main/contracts/PoolTemplate.sol#L180
VS Code
Make _conditions a fixed array of size 2
_conditions
true, but we keep the current implementation to leave some rooms for future upgrade. This is only one time function at deploy, so not going to be a problem in terms of user experience.
Handle
Dravee
Vulnerability details
Impact
Fixed arrays are less expensive than dynamic arrays and would implicitely add the array.length check
Proof of Concept
https://github.com/code-423n4/2022-01-insure/blob/main/contracts/PoolTemplate.sol#L180
Tools Used
VS Code
Recommended Mitigation Steps
Make
_conditions
a fixed array of size 2