Missing input validation on array lengths match
The functions below fail to perform input validation on arrays to verify the lengths match.A mismatch could lead to an exception or undefined behavior.
**Mitigation:
Add input validation to check that the length of both arrays match.
Check if a value is in an array before a push
In ConduitController.sol's updateChannel() function, it's possible to push an existing address channel several times in the same arrayhttps://github.com/code-423n4/2022-05-opensea-seaport/blob/main/contracts/conduit/ConduitController.sol#L143
Array .length Used Directly In For Loops
There is additional gas usage when an array's length value is used directly in a "for" loop.
*Occurrences in: https://github.com/code-423n4/2022-05-opensea-seaport/blob/main/contracts/lib/Consideration.sol#L215-L237 https://github.com/code-423n4/2022-05-opensea-seaport/blob/main/contracts/lib/Consideration.sol#L300-L323 https://github.com/code-423n4/2022-05-opensea-seaport/blob/main/contracts/lib/Consideration.sol#L349-L360 https://github.com/code-423n4/2022-05-opensea-seaport/blob/main/contracts/lib/Consideration.sol#L398-L410 https://github.com/code-423n4/2022-05-opensea-seaport/blob/main/contracts/lib/CriteriaResolution.sol#L43-L209 https://github.com/code-423n4/2022-05-opensea-seaport/blob/main/contracts/lib/FulfillmentApplier.sol#L493-L759 https://github.com/code-423n4/2022-05-opensea-seaport/blob/main/contracts/lib/FulfillmentApplier.sol#L141-L185 https://github.com/code-423n4/2022-05-opensea-seaport/blob/main/contracts/lib/FulfillmentApplier.sol#L198 OrderCombiner._fulfillAvailableAdvancedOrders() *OrderCombiner._validateOrdersAndPrepareToFulfill()
**Mitigation: Add input validation to check that the length of both arrays match.
*Occurrences in: https://github.com/code-423n4/2022-05-opensea-seaport/blob/main/contracts/lib/OrderCombiner.sol#L621 https://github.com/code-423n4/2022-05-opensea-seaport/blob/main/contracts/lib/OrderFulfiller.sol#L217 https://github.com/code-423n4/2022-05-opensea-seaport/blob/main/contracts/lib/OrderFulfiller.sol#L306