Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[opt] Fix too short of match getting generated #4223

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

terrelln
Copy link
Contributor

The optimal parser with LDM enabled using minMatch > 3 could generate a match length of 3 when minMatch >= 4. This is not allowed.

  1. Fix the bug
  2. Add validation logic to ZSTD_buildSeqStore() in debug mode for all block compressors that checks we never generate too short a match. This way we don't rely on the generate_sequences fuzzer to find this issue.

Credit to OSS-Fuzz

The optimal parser with LDM enabled using minMatch > 3 could generate a match
length of 3 when minMatch >= 4. This is not allowed.

1. Fix the bug
2. Add validation logic to `ZSTD_buildSeqStore()` in debug mode for all block
   compressors that checks we never generate too short a match. This way we don't
   rely on the `generate_sequences` fuzzer to find this issue.

Credit to OSS-Fuzz
@terrelln terrelln force-pushed the 2024-12-20-oss-fuzz-minmatch branch from 284d917 to 9458cbc Compare December 20, 2024 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants