aboutsummaryrefslogtreecommitdiffstats
path: root/solc
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2017-01-25 06:36:07 +0800
committerchriseth <c@ethdev.com>2017-01-25 06:37:48 +0800
commit3949624a61b1dd0c32e67d30fe7d46b2511c583f (patch)
tree796125372166adcc3207927650666186f32edbd8 /solc
parent605455f96b64f0c4b229cc31186f2dcf22433e6d (diff)
downloaddexon-solidity-3949624a61b1dd0c32e67d30fe7d46b2511c583f.tar
dexon-solidity-3949624a61b1dd0c32e67d30fe7d46b2511c583f.tar.gz
dexon-solidity-3949624a61b1dd0c32e67d30fe7d46b2511c583f.tar.bz2
dexon-solidity-3949624a61b1dd0c32e67d30fe7d46b2511c583f.tar.lz
dexon-solidity-3949624a61b1dd0c32e67d30fe7d46b2511c583f.tar.xz
dexon-solidity-3949624a61b1dd0c32e67d30fe7d46b2511c583f.tar.zst
dexon-solidity-3949624a61b1dd0c32e67d30fe7d46b2511c583f.zip
Also check library addresses.
Diffstat (limited to 'solc')
-rw-r--r--solc/CommandLineInterface.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/solc/CommandLineInterface.cpp b/solc/CommandLineInterface.cpp
index e49e8517..b3ffa6bb 100644
--- a/solc/CommandLineInterface.cpp
+++ b/solc/CommandLineInterface.cpp
@@ -432,6 +432,11 @@ bool CommandLineInterface::parseLibraryOption(string const& _input)
string addrString(lib.begin() + colon + 1, lib.end());
boost::trim(libName);
boost::trim(addrString);
+ if (!passesAddressChecksum(addrString, false))
+ {
+ cerr << "Invalid checksum on library address \"" << libName << "\": " << addrString << endl;
+ return false;
+ }
bytes binAddr = fromHex(addrString);
h160 address(binAddr, h160::AlignRight);
if (binAddr.size() > 20 || address == h160())