Skip to content

Commit

Permalink
Fix use-after-free bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
chriseth committed Oct 25, 2021
1 parent 5e8dba8 commit 785e16f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libyul/ControlFlowSideEffectsCollector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,8 @@ ControlFlowSideEffectsCollector::ControlFlowSideEffectsCollector(
if (calledSideEffects->canRevert)
sideEffects.canRevert = true;

for (YulString callee: util::valueOrDefault(m_functionCalls, _function))
set<YulString> emptySet;
for (YulString callee: util::valueOrDefault(m_functionCalls, _function, emptySet))
_recurse(callee, _recurse);
};
for (auto const& call: calls)
Expand Down

0 comments on commit 785e16f

Please sign in to comment.