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

Permanent Hang creating ZipFile(File)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.14
    • 1.16
    • Archivers
    • None
    • Windows 10 x64, jre 1.8.0_151

    Description

      While using Tika-1.15 and 1.17 to detect file types, it hangs when creating an instance of ZipFile with the attached corrupted zip file. Taking a thread dump shows the app is looping at the following point:

      java.lang.Thread.State: RUNNABLE
              at org.apache.commons.compress.archivers.zip.X0017_StrongEncryptionHeader.parseCentralDirectoryFormat(X0017_StrongEncryptionHeader.java:313)
              at org.apache.commons.compress.archivers.zip.X0017_StrongEncryptionHeader.parseFromCentralDirectoryData(X0017_StrongEncryptionHeader.java:380)
              at org.apache.commons.compress.archivers.zip.ExtraFieldUtils.parse(ExtraFieldUtils.java:181)
              at org.apache.commons.compress.archivers.zip.ZipArchiveEntry.setCentralDirectoryExtra(ZipArchiveEntry.java:598)
              at org.apache.commons.compress.archivers.zip.ZipFile.readCentralDirectoryEntry(ZipFile.java:706)
              at org.apache.commons.compress.archivers.zip.ZipFile.populateFromCentralDirectory(ZipFile.java:618)
              at org.apache.commons.compress.archivers.zip.ZipFile.<init>(ZipFile.java:290)
              at org.apache.commons.compress.archivers.zip.ZipFile.<init>(ZipFile.java:213)
              at org.apache.commons.compress.archivers.zip.ZipFile.<init>(ZipFile.java:196)
              at org.apache.commons.compress.archivers.zip.ZipFile.<init>(ZipFile.java:157)
              at org.apache.tika.parser.pkg.ZipContainerDetector.detectZipFormat(ZipContainerDetector.java:132)
              at org.apache.tika.parser.pkg.ZipContainerDetector.detect(ZipContainerDetector.java:88)
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            lfcnassif Luís Filipe Nassif
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: