From 3949624a61b1dd0c32e67d30fe7d46b2511c583f Mon Sep 17 00:00:00 2001 From: chriseth Date: Tue, 24 Jan 2017 23:36:07 +0100 Subject: Also check library addresses. --- solc/CommandLineInterface.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'solc/CommandLineInterface.cpp') 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()) -- cgit