diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-01-26 22:42:34 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-26 22:42:34 +0800 |
commit | 102fd7ee5daeb7d7a7bb1254cf0ce71a23ad1220 (patch) | |
tree | 0ad00aad0ed6e5dfb382b4a7443772319ec15d34 /solc/CommandLineInterface.cpp | |
parent | 024061b8280d51a11d91dc3347603c9281224705 (diff) | |
parent | f610ba77a493f8a6f270c72222d34eedfb183722 (diff) | |
download | dexon-solidity-102fd7ee5daeb7d7a7bb1254cf0ce71a23ad1220.tar dexon-solidity-102fd7ee5daeb7d7a7bb1254cf0ce71a23ad1220.tar.gz dexon-solidity-102fd7ee5daeb7d7a7bb1254cf0ce71a23ad1220.tar.bz2 dexon-solidity-102fd7ee5daeb7d7a7bb1254cf0ce71a23ad1220.tar.lz dexon-solidity-102fd7ee5daeb7d7a7bb1254cf0ce71a23ad1220.tar.xz dexon-solidity-102fd7ee5daeb7d7a7bb1254cf0ce71a23ad1220.tar.zst dexon-solidity-102fd7ee5daeb7d7a7bb1254cf0ce71a23ad1220.zip |
Merge pull request #1604 from ethereum/checksums
Warn about invalid checksums of addresses.
Diffstat (limited to 'solc/CommandLineInterface.cpp')
-rw-r--r-- | solc/CommandLineInterface.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/solc/CommandLineInterface.cpp b/solc/CommandLineInterface.cpp index 3e3053ce..2c1f0644 100644 --- a/solc/CommandLineInterface.cpp +++ b/solc/CommandLineInterface.cpp @@ -436,6 +436,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()) |