aboutsummaryrefslogtreecommitdiffstats
path: root/liblll
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-10-03 17:22:30 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-10-03 17:22:30 +0800
commitab206b8113c8127f8750e1fb1a541bf20950f225 (patch)
tree56e3c719ecfc9531496c528b20703781aa85f498 /liblll
parent37365478c19b1227261ba4246b4d2f06ef7bb522 (diff)
downloaddexon-solidity-ab206b8113c8127f8750e1fb1a541bf20950f225.tar
dexon-solidity-ab206b8113c8127f8750e1fb1a541bf20950f225.tar.gz
dexon-solidity-ab206b8113c8127f8750e1fb1a541bf20950f225.tar.bz2
dexon-solidity-ab206b8113c8127f8750e1fb1a541bf20950f225.tar.lz
dexon-solidity-ab206b8113c8127f8750e1fb1a541bf20950f225.tar.xz
dexon-solidity-ab206b8113c8127f8750e1fb1a541bf20950f225.tar.zst
dexon-solidity-ab206b8113c8127f8750e1fb1a541bf20950f225.zip
LLL: do not crash if import callback is null
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 49c48027..d4ef3888 100644
--- a/liblll/CodeFragment.cpp
+++ b/liblll/CodeFragment.cpp
@@ -224,6 +224,8 @@ void CodeFragment::constructOperation(sp::utree const& _t, CompilerState& _s)
string fileName = firstAsString();
if (fileName.empty())
error<InvalidName>("Empty file name provided");
+ if (!m_readFile)
+ error<InvalidName>("Import callback not present");
string contents = m_readFile(fileName);
if (contents.empty())
error<InvalidName>(std::string("File not found (or empty): ") + fileName);