mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
CommandLineInterface::link(): Report an error if a placeholder does not have exactly four underscores
This commit is contained in:
parent
bd1989bd0b
commit
f099d48b34
@ -1780,9 +1780,14 @@ bool CommandLineInterface::link()
|
||||
{
|
||||
while (it != end && *it != '_') ++it;
|
||||
if (it == end) break;
|
||||
if (end - it < placeholderSize)
|
||||
if (
|
||||
end - it < placeholderSize ||
|
||||
*(it + 1) != '_' ||
|
||||
*(it + placeholderSize - 2) != '_' ||
|
||||
*(it + placeholderSize - 1) != '_'
|
||||
)
|
||||
{
|
||||
serr() << "Error in binary object file " << src.first << " at position " << (end - src.second.begin()) << endl;
|
||||
serr() << "Error in binary object file " << src.first << " at position " << (it - src.second.begin()) << endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user