mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-03 21:23:38 +00:00
TarArchive.Open cause app crach #719
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @fuxuejun on GitHub (Nov 12, 2025).
Originally assigned to: @Copilot on GitHub.
when I use code to compress a tar file :
var options = new ReaderOptions();
options.ArchiveEncoding.Default = Encoding.Default;
var archive = TarArchive.Open(ms, options);
it will crashed, and throw exception:
at System.ThrowHelper.ThrowEndOfFileException + 0x5(Unknown Source)
at System.IO.Stream.ReadAtLeastCore + 0x19(Unknown Source)
at System.IO.Stream.ReadExactly + 0x9(Unknown Source)
at System.IO.BinaryReader.InternalRead + 0x26(Unknown Source)
at System.IO.BinaryReader.ReadUInt32 + 0xb(Unknown Source)
at SharpCompress.Compressors.ZStandard.ZStandardStream.IsZStandard + 0x6(Unknown Source)
at SharpCompress.Readers.Tar.TarReader.Open + 0xae(Unknown Source)
at SharpCompress.Archives.Tar.TarArchive.CreateReaderForSolidExtraction + 0x18(Unknown Source)
at SharpCompress.Archives.AbstractArchive`2.ExtractAllEntries + 0x6(Unknown Source)
@adamhathcock commented on GitHub (Nov 29, 2025):
Fixed in 0.42.0