mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fixes crash while encoding too large arrays.
This commit is contained in:
@@ -1698,6 +1698,9 @@ bool ArrayType::operator==(Type const& _other) const
|
||||
|
||||
bool ArrayType::validForCalldata() const
|
||||
{
|
||||
if (auto arrayBaseType = dynamic_cast<ArrayType const*>(baseType().get()))
|
||||
if (!arrayBaseType->validForCalldata())
|
||||
return false;
|
||||
return unlimitedCalldataEncodedSize(true) <= numeric_limits<unsigned>::max();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user