Skip to content

Commit

Permalink
This should fix bug #7779 : Firebird 4.0.3 is constantly crashing wit…
Browse files Browse the repository at this point in the history
…h the same symptoms (fbclient.dll)
  • Loading branch information
hvlad committed Oct 5, 2023
1 parent cf445b6 commit 765bc6b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/jrd/extds/IscDS.cpp
Expand Up @@ -113,6 +113,12 @@ void IscConnection::attach(thread_db* tdbb)
validatePassword(tdbb, m_dbName, newDpb);
newDpb.insertInt(isc_dpb_ext_call_depth, attachment->att_ext_call_depth + 1);

if (newDpb.getBufferLength() > MAX_USHORT)
{
ERR_post(Arg::Gds(isc_imp_exc) <<
Arg::Gds(isc_random) << Arg::Str("DPB size greater than 64KB"));
}

FbLocalStatus status;
{
EngineCallbackGuard guard(tdbb, *this, FB_FUNCTION);
Expand Down
2 changes: 1 addition & 1 deletion src/yvalve/why.cpp
Expand Up @@ -1593,7 +1593,7 @@ ISC_STATUS API_ROUTINE isc_attach_database(ISC_STATUS* userStatus, SSHORT fileLe
return status[1];

YAttachment* attachment = dispatcher->attachDatabase(&statusWrapper, pathName.c_str(),
dpbLength, reinterpret_cast<const UCHAR*>(dpb));
static_cast<USHORT>(dpbLength), reinterpret_cast<const UCHAR*>(dpb));
if (status.getState() & IStatus::STATE_ERRORS)
return status[1];

Expand Down

0 comments on commit 765bc6b

Please sign in to comment.