Explicitly turn uninitialized internal function pointers into invalid function when loaded from storage.

This commit is contained in:
chriseth
2019-05-27 17:26:37 +02:00
parent b836079006
commit 5b1a984882
3 changed files with 41 additions and 0 deletions
+6
View File
@@ -206,6 +206,12 @@ void StorageItem::retrieveValue(SourceLocation const&, bool _remove) const
CompilerUtils(m_context).splitExternalFunctionType(false);
cleaned = true;
}
else if (fun->kind() == FunctionType::Kind::Internal)
{
m_context << Instruction::DUP1 << Instruction::ISZERO;
CompilerUtils(m_context).pushZeroValue(*fun);
m_context << Instruction::MUL << Instruction::OR;
}
}
if (!cleaned)
{