zstd
zstd copied to clipboard
Refactor dictionary matchfinder index safety check
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.
I saw that this is marked as good first-issue, could I work on it?
@Federico-Maresca Please reach out if you have any questions :-)
Closed by #4039