Uploaded image for project: 'Commons Compress'
  1. Commons Compress
  2. COMPRESS-337

TAR header parsing attempts OLDGNU format on POSIX/STAR header

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • 1.10
    • None
    • Archivers
    • None

    Description

      This is at least tangentially related to COMPRESS-336, we found an archive which is misinterpreted as an OLDGNU header format when it appears to some type of STAR header (unlike COMPRESS-336 this one uses a NULL delimiter instead of space terminators for the time stamps). Apparently the archive itself comes from an EyeFi card(?!).

      Both the original archive (available here) and the (presumably hand made) version for testing (here) exhibit the same behavior: they fail with an IllegalArgumentException attempting to parse the old GNU realSize from a buffer partially filled with the atime/ctime values.

      At first I thought if the TarArchiveEntry.evaluateType were to also look at the version field for VERSION_GNU_SPACE before returning FORMAT_OLDGNU it should be enough (according to something I saw in the GNU documentation which defines OLDGNU_MAGIC "ustar " /* 7 chars and a null */). Unfortunately it looks like that is the magic/version used by the archives in question, leaving me stumped as to how to identify which of the three prevailing header formats needs to be parsed.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jgustie Jeremy Gustie
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: