Uploaded image for project: 'Commons BCEL'
  1. Commons BCEL
  2. BCEL-122

ArrayIndexOutOfBoundsException thrown from TABLESWITCH.initFromFile

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.2
    • Fix Version/s: 6.0
    • Component/s: Main
    • Labels:

      Description

      BCEL throws the ArrayIndexOutOfBoundsException when trying to construct a new org.apache.bcel.generic.MethodGen on a method containing the bytes compiled from the following code:

      switch {
      case Integer.MAX_VALUE:
      break;
      default:
      b = true;
      }

      The method that does not handle this corner case correctly is org.apache.bcel.generic.TABLESWITCH.initFromFile(ByteSequence, boolean).

        Attachments

        1. patch
          0.7 kB
          Timothy Alper

          Activity

            People

            • Assignee:
              issues@commons.apache.org Apache Commons Developers
              Reporter:
              talper@coverity.com Timothy Alper
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: