Merge pull request #6343 from ethereum/smt_fix_deref_null

[SMTChecker] Fix nullptr deref
This commit is contained in:
chriseth 2019-03-21 16:16:03 +01:00 committed by GitHub
commit 939a178193
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -791,7 +791,7 @@ void SMTChecker::endVisit(Literal const& _literal)
void SMTChecker::endVisit(Return const& _return) void SMTChecker::endVisit(Return const& _return)
{ {
if (knownExpr(*_return.expression())) if (_return.expression() && knownExpr(*_return.expression()))
{ {
auto returnParams = m_functionPath.back()->returnParameters(); auto returnParams = m_functionPath.back()->returnParameters();
if (returnParams.size() > 1) if (returnParams.size() > 1)