Skip to content

fix: Gzip comment with header checksum produces corrupt streams#2288

Open
williballenthin wants to merge 1 commit intogchq:masterfrom
williballenthin:fix-2243
Open

fix: Gzip comment with header checksum produces corrupt streams#2288
williballenthin wants to merge 1 commit intogchq:masterfrom
williballenthin:fix-2243

Conversation

@williballenthin
Copy link
Copy Markdown

The Gzip operation manually set the FCOMMENT flag bit after zlibjs had already calculated the header CRC16, corrupting the checksum. Fix by setting options.flags.fcomment before calling compress(), letting zlibjs handle the flag internally.

Closes #2243

AI disclosure
Claude Code Opus 4.6

The Gzip operation manually set the FCOMMENT flag bit after zlibjs
had already calculated the header CRC16, corrupting the checksum.
Fix by setting options.flags.fcomment before calling compress(),
letting zlibjs handle the flag internally.

Closes gchq#2243
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug report: Gzip operation produces invalid streams when using comments with header checksum

2 participants