Repository navigation
Reapply gzip FEXTRA XLEN overflow fix to release - #1433
Merged
Merged
Conversation
Reset scan-specific encryption state in sync and async header readers while retaining the KDF cache. Add RAR4/RAR5 rescan and solid encrypted extraction regression coverage. Fixes #1422
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The XLEN fix is correct and has focused sync/async boundary coverage, with prerequisite PR #1432 required to merge first.
0 open findings
What changed in this PR
Reapplies the GZip FEXTRA unsigned XLEN fix to release, alongside inherited changes from prerequisite recovery PRs.
Changes:
- Supports GZip extra-field lengths through 65,535 in synchronous and asynchronous decompression.
- Adds boundary regression tests for XLEN values 32,767, 32,768, and 65,535.
- Includes stacked ZIP multipart and encrypted RAR rescan fixes.
| File | Description |
|---|---|
src/SharpCompress/Compressors/Deflate/ZlibBaseStream.cs |
Parses XLEN without signed truncation. |
tests/SharpCompress.Test/GZip/GZipExtraFieldTests.cs |
Tests synchronous and asynchronous XLEN boundaries. |
src/SharpCompress/Archives/Zip/ZipArchiveVolumeFactory.cs |
Normalizes uppercase ZIP extensions. |
tests/SharpCompress.Test/Zip/ZipArchiveTests.cs |
Covers uppercase multipart ZIP discovery. |
src/SharpCompress/Common/Rar/Headers/RarHeaderFactory.cs |
Resets synchronous encrypted-header scan state. |
src/SharpCompress/Common/Rar/Headers/RarHeaderFactory.Async.cs |
Resets asynchronous scan state. |
tests/SharpCompress.Test/Rar/RarEncryptedHeaderScanTests.cs |
Covers encrypted rescans and solid extraction. |
tests/TestArchives/Archives/Rar5.solid.encrypted_headers.rar |
Supplies the solid encrypted RAR5 fixture. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
AsyncOnlyStream and EntryStream have no DisposeAsync on net48, so await using fails to compile for that target. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 9, 2026
This was referenced Oct 12, 2026
Merged
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Reapplies #1428 to the clean
releasehistory after the accidental master merge was removed.Handle the full unsigned 16-bit GZip extra-field length range in synchronous and asynchronous decompression, with boundary regression tests. This restores the first commit of #1428; the reader/archive follow-up is in the next PR.
31ab735bb047d6862071e903Review and merge order
Recovery PR 3 of 5. Depends on #1432. Merge that PR first.
All recovery PRs target
release. These branches are stacked, so this diff includes earlier recovery changes until the preceding PRs land. Review the replayed commit above for this PR's specific change. Merge in sequence using merge commits or fast-forward semantics to preserve shared ancestry; squash/rebase merging would require restacking the later branches.The RAR comment test correction (
e5c3ec6a) is already present in the clean base, so its checkpoint branch needs no separate PR. No master-only commits were replayed.Validation
Validated the completed recovery stack on .NET 10:
dotnet csharpier check .passed.Validation was performed on the final stack, not separately on every intermediate branch.