You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@orc.apache.org by "Dongjoon Hyun (Jira)" <ji...@apache.org> on 2021/11/11 04:17:00 UTC

[jira] [Resolved] (ORC-492) ArrayIndexOutOfBoundsException in OrcFile

     [ https://issues.apache.org/jira/browse/ORC-492?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dongjoon Hyun resolved ORC-492.
-------------------------------
    Fix Version/s: 1.8.0
         Assignee: Yiqun Zhang
       Resolution: Fixed

Thank you for reporting, [~tvamsikalyan].

This is resolved via https://github.com/apache/orc/pull/961 

> ArrayIndexOutOfBoundsException in OrcFile
> -----------------------------------------
>
>                 Key: ORC-492
>                 URL: https://issues.apache.org/jira/browse/ORC-492
>             Project: ORC
>          Issue Type: Bug
>            Reporter: Thippana Vamsi Kalyan
>            Assignee: Yiqun Zhang
>            Priority: Major
>             Fix For: 1.8.0
>
>
> 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).
> {code}
> if (val < 0 || versions.length < val) {
>  return FUTURE;
> }
> WriterVersion result = versions[val];
> {code}
> In case versions.length == val, it should still throw ArrayIndexOutOfBoundsException



--
This message was sent by Atlassian Jira
(v8.20.1#820001)