JarFile.getInputStream throws unexpected NASE

XMLWordPrintable

    • Type: Bug
    • Resolution: Delivered
    • Priority: P4
    • 18
    • Affects Version/s: 17
    • Component/s: core-libs

       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)

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

              Created:
              Updated:
              Resolved: