diff options
author | Yoichi Hirai <i@yoichihirai.com> | 2017-03-15 01:31:45 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-15 01:31:45 +0800 |
commit | 64e00e5371e2620a0bbd945d37e799e1e0309668 (patch) | |
tree | 23918719317fd0765cee32bff790471a0879671d /solc | |
parent | 409eb9e3e494ad5a45c14eb7f550ad8fad2b5573 (diff) | |
parent | 14196f2621cbc3a7580ae05b6f7508c92467168a (diff) | |
download | dexon-solidity-64e00e5371e2620a0bbd945d37e799e1e0309668.tar.gz dexon-solidity-64e00e5371e2620a0bbd945d37e799e1e0309668.tar.zst dexon-solidity-64e00e5371e2620a0bbd945d37e799e1e0309668.zip |
Merge pull request #1767 from ethereum/longlibnames
Do not crash on long linker commandline argument.
Diffstat (limited to 'solc')
-rw-r--r-- | solc/CommandLineInterface.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/solc/CommandLineInterface.cpp b/solc/CommandLineInterface.cpp index 0c777c77..31f70272 100644 --- a/solc/CommandLineInterface.cpp +++ b/solc/CommandLineInterface.cpp @@ -420,7 +420,16 @@ void CommandLineInterface::readInputFilesAndConfigureRemappings() bool CommandLineInterface::parseLibraryOption(string const& _input) { namespace fs = boost::filesystem; - string data = fs::is_regular_file(_input) ? contentsString(_input) : _input; + string data = _input; + try + { + if (fs::is_regular_file(_input)) + data = contentsString(_input); + } + catch (fs::filesystem_error const&) + { + // Thrown e.g. if path is too long. + } vector<string> libraries; boost::split(libraries, data, boost::is_space() || boost::is_any_of(","), boost::token_compress_on); |