Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8231451 ZipFileInputStream.skip does not handle negative values correctly
  3. JDK-8232384

Release Note: ZipFileInputStream::skip handling of negative values

    XMLWordPrintable

    Details

      Description

      When accessing a STORED entry within a Zip file using `ZipFileInputStream`, a negative value may be specified in order to skip backwards within the STORED entry and a negative value is returned indicating the number of bytes skipped backwards. If the specified value would move beyond the beginning of the file, the position is set to the beginning of the file and a negative value is returned indicating the number of bytes moved from the current position to the beginning of the file.

      When accessing a DEFLATED entry within a Zip file using `ZipFileInflaterInputStream` and a negative value is specified to the skip method, an `IllegalArgumentException` will be thrown.

        Attachments

          Activity

            People

            Assignee:
            lancea Lance Andersen
            Reporter:
            lancea Lance Andersen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: