mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 22:43:03 +01:00
Postfix for #7976: False validation error for short unpacked records (this time about short unpacked fragments)
This commit is contained in:
parent
65d5aa309b
commit
9c171d3783
@ -2805,9 +2805,9 @@ Validation::RTN Validation::walk_record(jrd_rel* relation, const rhd* header, US
|
||||
const auto format = MET_format(vdr_tdbb, relation, header->rhd_format);
|
||||
auto remainingLength = format->fmt_length;
|
||||
|
||||
auto calculateLength = [fragment, remainingLength](ULONG length, const UCHAR* data)
|
||||
auto calculateLength = [remainingLength](ULONG length, const UCHAR* data, bool notPacked)
|
||||
{
|
||||
if (fragment->rhdf_flags & rhd_not_packed)
|
||||
if (notPacked)
|
||||
{
|
||||
if (length > remainingLength)
|
||||
{
|
||||
@ -2826,7 +2826,8 @@ Validation::RTN Validation::walk_record(jrd_rel* relation, const rhd* header, US
|
||||
return Compressor::getUnpackedLength(length, data);
|
||||
};
|
||||
|
||||
remainingLength -= calculateLength(length, p);
|
||||
bool notPacked = (fragment->rhdf_flags & rhd_not_packed) != 0;
|
||||
remainingLength -= calculateLength(length, p, notPacked);
|
||||
|
||||
// Next, chase down fragments, if any
|
||||
|
||||
@ -2878,7 +2879,8 @@ Validation::RTN Validation::walk_record(jrd_rel* relation, const rhd* header, US
|
||||
length -= RHD_SIZE;
|
||||
}
|
||||
|
||||
remainingLength -= calculateLength(length, p);
|
||||
notPacked = (fragment->rhdf_flags & rhd_not_packed) != 0;
|
||||
remainingLength -= calculateLength(length, p, notPacked);
|
||||
|
||||
page_number = fragment->rhdf_f_page;
|
||||
line_number = fragment->rhdf_f_line;
|
||||
|
Loading…
Reference in New Issue
Block a user