Uploaded image for project: 'ORC'
  1. ORC
  2. ORC-492

ArrayIndexOutOfBoundsException in OrcFile

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.7.1, 1.6.12
    • 1.7.2
    • None
    • None

    Description

      https://github.com/apache/orc/blob/fd0b9f9f1a25d37614e2ad79c273b74e7ee02617/java/core/src/java/org/apache/orc/OrcFile.java#L238

      Earlier code did not handle possible negative values for array index, and latest code handles the case.

      Following is the check that handles negative index value. Based on code review, I see an issue with code when (versions.length == val).

      if (val < 0 || versions.length < val) {
       return FUTURE;
      }
      WriterVersion result = versions[val];
      

      In case versions.length == val, it should still throw ArrayIndexOutOfBoundsException

      Attachments

        Issue Links

          Activity

            People

              Guiyankuang Yiqun Zhang
              tvamsikalyan Thippana Vamsi Kalyan
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: