mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Do not provide access to external assembly variables from within functions.
This commit is contained in:
parent
0ef45b2890
commit
64312584dc
@ -336,9 +336,11 @@ void CompilerContext::appendInlineAssembly(
|
||||
identifierAccess.resolve = [&](
|
||||
yul::Identifier const& _identifier,
|
||||
yul::IdentifierContext,
|
||||
bool
|
||||
)
|
||||
bool _insideFunction
|
||||
) -> size_t
|
||||
{
|
||||
if (_insideFunction)
|
||||
return size_t(-1);
|
||||
auto it = std::find(_localVariables.begin(), _localVariables.end(), _identifier.name.str());
|
||||
return it == _localVariables.end() ? size_t(-1) : 1;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user