Skip to content

Commit

Permalink
Fixed bug #7860 : Crash potentially caused by BETWEEN Operator
Browse files Browse the repository at this point in the history
  • Loading branch information
hvlad committed Nov 24, 2023
1 parent e74e407 commit 596b62a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/jrd/recsrc/ConditionalStream.cpp
Expand Up @@ -53,9 +53,9 @@ void ConditionalStream::open(thread_db* tdbb) const
jrd_req* const request = tdbb->getRequest();
Impure* const impure = request->getImpure<Impure>(m_impure);

impure->irsb_flags = irsb_open;

impure->irsb_next = m_boolean->execute(tdbb, request) ? m_first : m_second;

impure->irsb_flags = irsb_open;
impure->irsb_next->open(tdbb);
}

Expand All @@ -71,7 +71,8 @@ void ConditionalStream::close(thread_db* tdbb) const
{
impure->irsb_flags &= ~irsb_open;

impure->irsb_next->close(tdbb);
if (impure->irsb_next)
impure->irsb_next->close(tdbb);
}
}

Expand Down

0 comments on commit 596b62a

Please sign in to comment.