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

Avoid unexpected sign extension when converting from signed 16-bit to unsigned 32-bit. This fixes #6893: Problem with replication of BLOB segments longer than 32KB.

This commit is contained in:
Dmitry Yemanov 2021-07-16 15:47:51 +03:00
parent 56cc764b4a
commit 30473f4851

View File

@ -341,7 +341,7 @@ void Applier::process(thread_db* tdbb, ULONG length, const UCHAR* data)
blob_id.bid_quad.bid_quad_high = reader.getInt32();
blob_id.bid_quad.bid_quad_low = reader.getInt32();
do {
const ULONG length = reader.getInt16();
const ULONG length = (USHORT) reader.getInt16();
if (!length)
{
// Close our newly created blob