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

RC2ParameterSpec throws IllegalArgumentException when offset is negative

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3 P3
    • None
    • 25
    • security-libs
    • Cause Known
    • generic
    • generic

      https://bugs.openjdk.org/browse/JDK-8350440 spec amendments for RC2ParameterSpec
      ArrayIndexOutOfBoundsException if offset is negative.

      One of the case not satisfying the amended spec.
      RC2ParameterSpec:"ArrayIndexOutOfBoundsException if offset is negative."

      For example :
      new RC2ParameterSpec(2,"testHello".getBytes(UTF_8), Integer.MIN_VALUE);

      expected to throw ArrayIndexOutOfBoundsException but throws IAEx.

      This needs to be fixed or clarified in the spec?


            mpowers Mark Powers
            kganapureddy Krushnareddy Ganapureddy
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: