mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #6822 from ethereum/uninitializedLoadFromStorage
Explicitly turn uninitialized internal function pointers into invalid function when loaded from storage.
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user