Skip to content

Refactor dictionary matchfinder index safety check #3334

@embg

Description

@embg

There is a safety check in all zstd dictionary matchfinders which checks that the 4-byte repcode match candidate doesn't span across the dictionary and the prefix:

if (((U32) ((prefixStartIndex - 1) - repIndex) >= 3) /* intentional underflow : ensure repIndex isn't overlapping dict + prefix */

It would be nice to replace this with a descriptive helper function across all dictionary matchfinders. I don't think this is release blocking, but I'm opening the issue to track it since it would be a nice improvement.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions