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

JarFile.getInputStream throws unexpected NASE

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • P4
    • Resolution: Fixed
    • None
    • 18
    • core-libs

    Description

       Loading a fuzzed signed JAR file throws an unexpected exception:

      java Test
      Exception in thread "main" java.lang.NegativeArraySizeException: -1090511228
              at java.base/java.util.jar.JarFile.getBytes(JarFile.java:806)
              at
      java.base/java.util.jar.JarFile.initializeVerifier(JarFile.java:755)
              at java.base/java.util.jar.JarFile.getInputStream(JarFile.java:840)
              at Test.reproduceIssue(Test.java:39)
              at Test.main(Test.java:58)

      Attachments

        Activity

          People

            lancea Lance Andersen
            jeff Jeff Dinkins
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: