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

Some non TAR files are recognized by ArchiveStreamFactory

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.10
    • Fix Version/s: 1.11
    • Component/s: Archivers
    • Labels:
      None

      Description

      I ran into a case where a PNG file is being recognized as TAR because TarUtils.verifyCheckSum reports it as having a valid checksum (in this case the code thinks the stored checksum is 36936, unsigned is 31155 and signed is 19635). Because the stored checksum value is larger then the unsigned checksum it is treated as a valid TAR.

      I haven't spent enough time digging into the problem to see if there is a good alternative to the existing check that doesn't have false positives like this PNG file (which, if anyone is interested comes from an Android download).

      Also, I noticed a minor thing in the code: the comment in TarUtils.verifyCheckSum has the wrong bug number listed (it says 177 instead of 117).

        Attachments

        1. ic_secure.png
          1 kB
          Jeremy Gustie

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                jgustie Jeremy Gustie
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: