Commons Compress
  1. Commons Compress
  2. COMPRESS-206

TarArchiveOutputStream sometimes writes garbage beyond the end of the archive

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0, 1.4.1
    • Fix Version/s: 1.5
    • Component/s: Compressors
    • Labels:
      None
    • Environment:

      Linux x86

      Description

      For some combinations of file lengths, the archive created by TarArchiveOutputStream writes garbage beyond the end of the TAR stream. TarArchiveInputStream can still read the stream without problems, but it does not read beyond the garbage. This is problematic for my use case because I write a checksum after the TAR content. If I then try to read the checksum back, I read garbage instead.

      Functional impact:

      • TarArchiveInputStream is asymmetrical with respect to TarArchiveOutputStream, in the sense that TarArchiveInputStream does not read everything that was written by TarArchiveOutputStream.
      • The content is unnecessarily large. The garbage is totally unnecessarily large: ~10K overhead compared to Linux command-line tar.

      This symptom is remarkably similar to #COMPRESS-81, which is supposedly fixed since 1.1. Except for the fact that this issue still exists... I've tested this with 1.0 and 1.4.1.

      1. COMPRESS-206.patch
        4 kB
        Peter De Maeyer

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Peter De Maeyer
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development