Merge pull request #118 from chriseth/rejectEtherSentToLibrary

Reject ether sent to library.
This commit is contained in:
chriseth
2015-10-07 16:41:49 +02:00
2 changed files with 26 additions and 0 deletions
+3
View File
@@ -260,6 +260,9 @@ void Compiler::appendFunctionSelector(ContractDefinition const& _contract)
m_context << returnTag;
appendReturnValuePacker(FunctionType(*fallback).returnParameterTypes(), _contract.isLibrary());
}
else if (_contract.isLibrary())
// Reject invalid library calls and ether sent to a library.
m_context.appendJumpTo(m_context.errorTag());
else
m_context << eth::Instruction::STOP; // function not found