aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/analysis/ReferencesResolver.cpp
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2018-08-07 19:13:52 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2018-08-07 20:18:38 +0800
commiteb7b3862ac5089615710d07c9a56b8edc0472394 (patch)
tree4bb0af26fbbb098267140b11838b72eb9e9037ae /libsolidity/analysis/ReferencesResolver.cpp
parent8b2d630275fb29d2915af76f608be4d4e422907f (diff)
downloaddexon-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.cpp2
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);