Commit Graph

2923 Commits

Author SHA1 Message Date
Adam Hathcock
bc1ade2bbc Reject truncated LZMA2 headers and prevent stalled decoding 2026-10-16 15:23:57 +01:00
Adam Hathcock
e4193af83b Merge pull request #1435 from adamhathcock/rebuild/release-06-7z-header-bounds
Reapply 7z next-header bounds validation to release
0.50.5
2026-10-09 15:10:21 +01:00
Adam Hathcock
0bdf3b4d03 Merge pull request #1434 from adamhathcock/rebuild/release-05-gzip-reader-archive
Reapply gzip reader/archive XLEN overflow fix to release
2026-10-09 15:10:05 +01:00
Adam Hathcock
3c6c76fd4e Merge remote-tracking branch 'origin/rebuild/release-05-gzip-reader-archive' into rebuild/release-06-7z-header-bounds 2026-10-09 15:01:17 +01:00
Adam Hathcock
67a22cca97 Fix net48 test build: use plain using for AsyncOnlyStream in gzip reader/archive tests
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 14:59:45 +01:00
Adam Hathcock
6b54523cc6 Merge remote-tracking branch 'origin/release' into rebuild/release-06-7z-header-bounds 2026-10-09 14:51:41 +01:00
Adam Hathcock
f07d5e5d75 Merge remote-tracking branch 'origin/release' into rebuild/release-05-gzip-reader-archive 2026-10-09 14:51:14 +01:00
Adam Hathcock
7ef422dd9f Merge pull request #1433 from adamhathcock/rebuild/release-04-gzip-extra-field
Reapply gzip FEXTRA XLEN overflow fix to release
2026-10-09 14:50:00 +01:00
Adam Hathcock
830c816269 Fix net48 test build: use plain using for types without DisposeAsync
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>
2026-10-09 14:41:59 +01:00
Adam Hathcock
e66c448589 Merge pull request #1431 from adamhathcock/rebuild/release-01-uppercase-split-zip
Reapply uppercase split ZIP parts fix to release
2026-10-09 14:36:01 +01:00
Adam Hathcock
2f2730fd01 Validate 7z next header bounds before allocation 2026-10-09 11:56:36 +01:00
Vadim Syrov
5214c349d1 Fix gzip XLEN overflow in reader and archive APIs 2026-10-09 11:56:36 +01:00
Vadim Syrov
b047d6860a Fix gzip FEXTRA XLEN overflow 2026-10-09 11:56:36 +01:00
Adam Hathcock
bc58792b86 Fix encrypted RAR header state when rescanning archives
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
2026-10-09 11:56:35 +01:00
Iain
23e667ed24 Fix split zip parts not found when the .ZIP is uppercase 2026-10-09 11:56:23 +01:00
Adam Hathcock
2071e9036a Merge pull request #1426 from adamhathcock/fix/rar5-file-data-key-cache
Reuse RAR5 derived keys across encrypted file entries
2026-10-05 11:10:18 +01:00
Adam Hathcock
e0fab1497e Merge pull request #1420 from adamhathcock/fix/rar5-encrypted-comments
Fix encrypted RAR5 archive comments
2026-10-05 11:08:22 +01:00
Adam Hathcock
2cd70d019f Reuse RAR5 derived keys across encrypted file entries 2026-10-05 11:05:33 +01:00
Adam Hathcock
ce081cda1c fix build 2026-10-05 10:59:57 +01:00
Adam Hathcock
915183320c added some review fixes 2026-10-05 10:48:34 +01:00
Adam Hathcock
4f8c69f2c3 don't use RarReader directory 2026-10-02 15:23:16 +01:00
Adam Hathcock
8cc42b1d4a use arraypool 2026-10-02 13:56:16 +01:00
Adam Hathcock
d3edc48654 Merge remote-tracking branch 'origin/release' into fix/rar5-encrypted-comments 2026-10-02 13:53:38 +01:00
Adam Hathcock
b3cb862b02 Merge pull request #1421 from adamhathcock/fix/dotnet-sdk-nuget-audit
Update .NET SDK and SourceLink to fix NuGet auditing
2026-10-02 13:46:01 +01:00
Adam Hathcock
545dfb61be Update .NET SDK and SourceLink to fix NuGet auditing 2026-10-02 13:40:23 +01:00
Adam Hathcock
1c3c265a7a Merge pull request #1419 from adamhathcock/fix/rar5-header-key-cache
Cache RAR5 encrypted header key derivation
2026-10-02 13:35:13 +01:00
Adam Hathcock
b67a8a4ead Fix encrypted RAR5 archive comments 2026-10-02 13:33:55 +01:00
Adam Hathcock
c90997e12e Fix repeated RAR5 encrypted header key derivation 2026-10-02 09:39:38 +01:00
Adam Hathcock
c083c6efd8 fmt 0.50.4 2026-08-05 15:59:16 +01:00
Adam Hathcock
ec1c0ac3c2 Merge pull request #1407 from adamhathcock/adam/fix-tar-symlink
Adam/fix tar symlink
2026-08-05 15:45:45 +01:00
Adam Hathcock
a25ef129a4 Fix sym link tests 2026-08-05 15:44:27 +01:00
Adam Hathcock
b97cce5ef1 review fixes 2026-08-05 15:44:27 +01:00
Adam Hathcock
513b6bec45 fixes SharpCompress TAR extraction overwrites files outside the extraction root when a SymbolicLinkHandler enables symlink chaining 2026-08-05 15:44:27 +01:00
Adam Hathcock
67bd9289f9 Merge pull request #1396 from adamhathcock/adam/fix-rar5-decompression-error
Fix RAR5 async decompression corruption in UnpWriteBufAsync
0.50.3
2026-08-01 12:50:05 +01:00
Adam Hathcock
2a2218bcf7 small fix 2026-08-01 12:49:47 +01:00
Adam Hathcock
bc06a9df8b Some clean up 2026-08-01 12:43:44 +01:00
copilot-swe-agent[bot]
cfdfad26b6 Fix RAR5 async decompression corruption in UnpWriteBufAsync
Three bugs in the async version of UnpWriteBuf (used only in the async
decompression path) were causing data corruption when decompressing RAR5
archives containing executable filters (E8/E8E9/ARM) whose blocks spanned
the 4MB write boundary (UNPACK_MAX_WRITE):

1. WrittenFileSize was only incremented inside `if (OutMem != null)`, but
   should always be incremented after ApplyFilter (matching sync behavior).

2. UnpSomeRead = true was missing from the filter processing path.

3. In the NotAllFiltersProcessed else branch (filter intersects write border):
   - WrPtr was not updated to WrittenBorder, corrupting the window pointer
     used to compute WriteBorder on the next flush cycle
   - Remaining filters had NextWindow set to true (inverted logic), when
     sync correctly sets them to false so they are processed next time

All three changes align the async path with the sync UnpWriteBuf logic.
2026-08-01 12:19:09 +01:00
Adam Hathcock
246d968b4d Merge pull request #1393 from adamhathcock/adam/flat-gzip-fix-stream-rewind
Fix SeekableSharpCompressStream.StopRecording() to rewind to recorded…
0.50.2
2026-07-31 16:31:43 +01:00
Adam Hathcock
82c44cb5a5 remove async dispose 2026-07-31 14:52:58 +01:00
Adam Hathcock
a8f6f18843 Fix SeekableSharpCompressStream.StopRecording() to rewind to recorded position
When SeekableSharpCompressStream.StopRecording() was called (e.g. after the tar
probe in GZipFactory.TryOpenReader), it cleared _recordedPosition without seeking
back to it. This left the underlying FileStream at the advanced position reached
during the probe, so the subsequent GZipReader would start reading from the
wrong offset, producing Key=null and 0 extracted bytes.

Fix: seek back to _recordedPosition before clearing it, matching the behavior of
the non-seekable SharpCompressStream.StopRecording() which rewinds _logicalPosition.

Also enhance the existing GZip_ReaderFactory_FlatGZip test to actually verify the
extracted content (not just MoveToNextEntry returns true), and add an async variant.

Closes #1391
2026-07-31 14:21:24 +01:00
Adam Hathcock
6062623dd8 Merge pull request #1376 from adamhathcock/copilot/fix-uncompress-tar-gz-error
Fix tar.gz reader detection for GZip archive entry streams
0.50.1
2026-07-25 17:27:43 +01:00
Adam Hathcock
fe75f28ac9 DataDescriptor should always be non-seekable 2026-07-25 17:08:50 +01:00
Adam Hathcock
ba221b27af Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-07-24 09:34:18 +01:00
copilot-swe-agent[bot]
3e61a72248 test: broaden transformed stream reader coverage 2026-07-24 07:35:07 +00:00
copilot-swe-agent[bot]
3375aaa90c fix: preserve transformed streams in reader detection 2026-07-24 07:18:02 +00:00
copilot-swe-agent[bot]
0bb5b62842 Initial plan 2026-07-24 07:09:41 +00:00
Adam Hathcock
bb7be935a3 Merge pull request #1372 from adamhathcock/adam/pr-1369
Fixes ZipWriter to be fully forward only
2026-07-23 10:23:12 +01:00
Adam Hathcock
152a66f802 add more tests 2026-07-23 10:17:28 +01:00
Adam Hathcock
4f1d0d32ce Merge pull request #1371 from adamhathcock/copilot/fix-readerfactory-flat-gzip-issue
Fix ArgumentException in ZlibBaseStream when disposing mid-stream GZip probe in ReaderFactory
2026-07-23 10:14:02 +01:00
Adam Hathcock
e3b7a560ba Fix legacy build issue 2026-07-23 10:04:06 +01:00