8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 03:23:04 +01:00

Additional fix for CORE-4645, thanks to Dmitry

This commit is contained in:
hvlad 2016-06-27 00:15:00 +03:00
parent 2b58717ee4
commit 6c1fb82629

View File

@ -569,7 +569,7 @@ void TRA_get_inventory(thread_db* tdbb, UCHAR* bit_vector, TraNumber base, TraNu
{
ULONG l = base % trans_per_tip;
const UCHAR* q = tip->tip_transactions + TRANS_OFFSET(l);
l = TRANS_OFFSET(MIN((top + TRA_MASK - base), trans_per_tip - l));
l = TRANS_OFFSET(MIN((top + TRA_MASK + 1 - base), trans_per_tip - l));
memcpy(p, q, l);
p += l;
}
@ -588,7 +588,7 @@ void TRA_get_inventory(thread_db* tdbb, UCHAR* bit_vector, TraNumber base, TraNu
TPC_update_cache(tdbb, tip, sequence - 1);
if (p)
{
const ULONG l = TRANS_OFFSET(MIN((top + TRA_MASK - base), trans_per_tip));
const ULONG l = TRANS_OFFSET(MIN((top + TRA_MASK + 1 - base), trans_per_tip));
memcpy(p, tip->tip_transactions, l);
p += l;
}