mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-07-25 18:33:15 +00:00
While enumerating the entries of a tar file and writing their contents to disk using TarArchive, it was discovered TarArchive was not properly discarding padding bytes in the last block of each entry. TarArchive was sometimes able to recover depending on the number of padding bytes due to the logic it uses to find the next entry header, but not always. TarArchive was changed to use TarReadOnlySubStream when opening entries and TarReadOnlySubstream was changed to ensure all an entry's blocks are read when it is being disposed. Fixes adamhathcock/sharpcompress#524