zstd icon indicating copy to clipboard operation
zstd copied to clipboard

Refactor dictionary matchfinder index safety check

Open embg opened this issue 3 years ago • 2 comments

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.

embg avatar Dec 08 '22 15:12 embg

I saw that this is marked as good first-issue, could I work on it?

Federico-Maresca avatar May 08 '24 12:05 Federico-Maresca

@Federico-Maresca Please reach out if you have any questions :-)

embg avatar May 08 '24 16:05 embg

Closed by #4039

embg avatar May 29 '24 16:05 embg