Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4408447

ZipOutputStream.setComment parameter validation is incorrect

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.4.0
    • 1.3.0
    • core-libs
    • beta2
    • generic
    • generic
    • Verified



      Name: krC82822 Date: 01/25/2001


      java version "1.3.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
      Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)

      The implementation of setComment(String comment) in java.util.zip classes
      ZipEntry and ZipOutputStream was done without regard to what UTF8 encoding
      means.

      Only comment Strings which contain ANSI, or 7 bit, characters
      can produce a one-to-one correspondence between comment.length() and
      byte[].length, after UTF8 encoding, which is what the current implementation
      assumes.
      (Review ID: 115753)
      ======================================================================

            kkladkosunw Konstantin Kladko (Inactive)
            kryansunw Kevin Ryan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: