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 84a3d66 commit 5086632
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/jrd/recsrc/ConditionalStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ void ConditionalStream::internalOpen(thread_db* tdbb) const
Request* 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 @@ -75,7 +75,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 5086632

Please sign in to comment.