aboutsummaryrefslogtreecommitdiffstats
path: root/liblll
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-06-22 07:40:55 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-06-23 06:00:22 +0800
commit581aace50167ef36240f0ce37c56bd90e70a6163 (patch)
tree0069774a6913f65f48551174418f6df67b617755 /liblll
parent79ed529b3fc9fb03460ad3c8e6f1cb05434358b4 (diff)
downloaddexon-solidity-581aace50167ef36240f0ce37c56bd90e70a6163.tar.gz
dexon-solidity-581aace50167ef36240f0ce37c56bd90e70a6163.tar.zst
dexon-solidity-581aace50167ef36240f0ce37c56bd90e70a6163.zip
LLL: do not allow empty variable names
Diffstat (limited to 'liblll')
-rw-r--r--liblll/CodeFragment.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/liblll/CodeFragment.cpp b/liblll/CodeFragment.cpp
index 1329ec9b..ff173e91 100644
--- a/liblll/CodeFragment.cpp
+++ b/liblll/CodeFragment.cpp
@@ -173,6 +173,8 @@ void CodeFragment::constructOperation(sp::utree const& _t, CompilerState& _s)
auto varAddress = [&](string const& n)
{
+ if (n.empty())
+ error<InvalidName>("Empty variable name not allowed");
auto it = _s.vars.find(n);
if (it == _s.vars.end())
error<InvalidName>(std::string("Symbol not found: ") + s);