mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Raise error on oversized number literals in assembly
This commit is contained in:
@@ -82,6 +82,14 @@ bool AsmAnalyzer::operator()(assembly::Literal const& _literal)
|
||||
);
|
||||
return false;
|
||||
}
|
||||
else if (_literal.kind == assembly::LiteralKind::Number && bigint(_literal.value) > u256(-1))
|
||||
{
|
||||
m_errorReporter.typeError(
|
||||
_literal.location,
|
||||
"Number literal too large (> 256 bits)"
|
||||
);
|
||||
return false;
|
||||
}
|
||||
m_info.stackHeightInfo[&_literal] = m_stackHeight;
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user