Skip to content

Fix sequence length overflow in ZSTD_compressSequences - #4989

Open
terrelln wants to merge 1 commit into
meta:devfrom
terrelln:2026-11-17-compress-sequences
Open

terrelln wants to merge 1 commit into
meta:devfrom
terrelln:2026-11-17-compress-sequences

Conversation

@terrelln

Copy link
Copy Markdown
Contributor

Use 64-bit sequence totals and positions to avoid overflow before block splitting. Reject oversized explicit blocks while retaining 32-bit arithmetic for block-bounded lengths.

Add a regression test covering both delimiter modes with validation enabled and disabled.

Use 64-bit sequence totals and positions to avoid overflow
before block splitting. Reject oversized explicit blocks
while retaining 32-bit arithmetic for block-bounded lengths.

Add a regression test covering both delimiter modes with
validation enabled and disabled.
@meta-cla meta-cla Bot added the CLA Signed label Nov 18, 2026

@Cyan4973 Cyan4973 left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Took me a while to remember the context around ZSTD_transferSequences_noDelim(), but now that's clearer, and yes, it looks correct to me.

This branch has not been deployed

No deployments
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