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

ZipArchiveInputStream: ArrayIndexOutOfBoundsException when extracting a STORED zip file entry from within a zip.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.4.1
    • Fix Version/s: 1.5
    • Component/s: Archivers
    • Labels:
      None
    • Environment:

      Windows (Linux as well)

      Description

      When trying to read out a ZIP file, that has been stored (Method STORE, not DEFLATE!, with DEFLATE it seems OK) in another ZIP file using the ZipArchiveInputStream, I do get an ArrayIndexOutOfBoundsException when doing the arraycopy in ZipArchiveInputStream#readStored(byte[], int, int) (line 362) because the "toRead" is not decreased by the buf.offsetInBuffer.

      I will add the zip in question as attachment.

        Attachments

        1. ZipArchiveInputStreamTest.java
          1 kB
          Wurstbrot mit Senf
        2. compress-219-test.patch
          2 kB
          Stefan Bodewig
        3. test-linux.zip
          2 kB
          Wurstbrot mit Senf

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              wurstbrot Wurstbrot mit Senf
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: