diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2018-08-07 19:13:52 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2018-08-07 20:18:38 +0800 |
commit | eb7b3862ac5089615710d07c9a56b8edc0472394 (patch) | |
tree | 4bb0af26fbbb098267140b11838b72eb9e9037ae /libsolidity/analysis/ReferencesResolver.cpp | |
parent | 8b2d630275fb29d2915af76f608be4d4e422907f (diff) | |
download | dexon-solidity-eb7b3862ac5089615710d07c9a56b8edc0472394.tar.gz dexon-solidity-eb7b3862ac5089615710d07c9a56b8edc0472394.tar.zst dexon-solidity-eb7b3862ac5089615710d07c9a56b8edc0472394.zip |
Properly handle invalid references used together with _slot and _offset.
Diffstat (limited to 'libsolidity/analysis/ReferencesResolver.cpp')
-rw-r--r-- | libsolidity/analysis/ReferencesResolver.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libsolidity/analysis/ReferencesResolver.cpp b/libsolidity/analysis/ReferencesResolver.cpp index 5458c1b0..b888ecd6 100644 --- a/libsolidity/analysis/ReferencesResolver.cpp +++ b/libsolidity/analysis/ReferencesResolver.cpp @@ -262,6 +262,8 @@ bool ReferencesResolver::visit(InlineAssembly const& _inlineAssembly) return size_t(-1); } declarations = m_resolver.nameFromCurrentScope(realName); + if (!dynamic_cast<VariableDeclaration const*>(declarations.front())) + return size_t(-1); } if (declarations.size() != 1) return size_t(-1); |