Skip to content

Bugs in the internal record compression routines [CORE3115] #3493

@firebird-automations

Description

@firebird-automations

Submitted by: @ibprovider

1. SQZ_decompress

while (input < last)
{
const int len = (signed char) *input++;

if (len < 0)
{
if(input == last) // <----- !!!
{
BUGCHECK(179); //! \todo Use an other BUGCHECK code
}

const UCHAR c = \*input\+\+;

---------
2. SQZ_differences

while (end1 - rec1 > 2)
{
if (rec1[0] != rec2[0] || rec1[1] != rec2[1])
{
p = out++;
/* cast this to LONG to take care of OS/2 pointer arithmetic
when rec1 is at the end of a segment, to avoid wrapping around */

const SCHAR* yellow = (SCHAR *) MIN((U_IPTR) end1, ((U_IPTR) rec1 + 127)) - 1;

while ( (rec1 <= yellow && rec1[0] != rec2[0]) ||
(/*1*/ rec1 < yellow /*1*/ && /*2*/ rec1[1] != rec2[1] /*2*/) ) // <----- !!!
{

Commits: da81e6b f535bb8 db34472

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions