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

ArrayIndexOutOfBoundsException thrown from TABLESWITCH.initFromFile

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 5.2
    • 6.0
    • Main

    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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment