You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
flate: Data corruption when compressing with flate.BestCompression #1114
Reproducer here: https://go.dev/play/p/bU_ax9x8Ct2
It seems to trigger when compressing over a certain amount of data, in this case, just 1MiB of 0x00 results in: decompress: flate: corrupt input before offset 10
when attempted to decompress the just compressed data.
This seems to have been introduced in commit 6e2f5d5, released in v1.18.1, commits before that one produce the expected output.
Activity
klauspost commentedon Nov 30, 2025
Interesting. It seems to also dependent on the particular alignment of the block size.
TestVeryLongSparseChunkdoesn't seem to hit it.I will see if I can do a proper fix and avoid the revert. I will probably release and retract the old.
Fix invalid encoding on level 9 with single value input
klauspost commentedon Nov 30, 2025
Submitted #1115 - will probably also include a retraction.
I will leave fuzz testing running over night and probably release tomorrow.
Fix invalid encoding on level 9 with single value input (#1115)
build: Run go get against main to spot redacted
build: Run go get against main to spot redacted
build: Run go get against main to spot redacted
build: Run go get against main to spot redacted
go.mod: upgrade github.com/klauspost/compress
go.mod: upgrade github.com/klauspost/compress
go.mod: upgrade github.com/klauspost/compress
fix(deps): update retracted klauspost/compress to v1.18.2
build: Run go get against main to spot redacted
build: Run go get against main to spot redacted
go: avoid retracted `github.com/klauspost/compress@v1.18.1`
deps(build): bump klauspost/compress because of redaction warning
deps(build): bump klauspost/compress because of redaction warning
flate: count the whole window for the level 9 literal cost estimate (#…
flate: count the whole window for the level 9 literal cost estimate (k…
s2/cmd: Harden CLI output creation and self-extractor tar extraction (#…