[
https://issues.apache.org/jira/browse/HADOOP-12677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17746660#comment-17746660
]
ASF GitHub Bot commented on HADOOP-12677:
-----------------------------------------
jojochuang opened a new pull request, #5886:
URL: https://github.com/apache/hadoop/pull/5886
### Description of PR
Cast DecompressorStream.skip() properly.
### How was this patch tested?
Unit test
### For code changes:
- [ X] Does the title or this PR starts with the corresponding JIRA issue id
(e.g. 'HADOOP-17799. Your PR title ...')?
- [ ] Object storage: have the integration tests been executed and the
endpoint declared according to the connector-specific documentation?
- [ ] If adding new dependencies to the code, are these dependencies
licensed in a way that is compatible for inclusion under [ASF
2.0](http://www.apache.org/legal/resolved.html#category-a)?
- [ ] If applicable, have you updated the `LICENSE`, `LICENSE-binary`,
`NOTICE-binary` files?
> DecompressorStream throws IndexOutOfBoundsException when calling skip(long)
> ---------------------------------------------------------------------------
>
> Key: HADOOP-12677
> URL: https://issues.apache.org/jira/browse/HADOOP-12677
> Project: Hadoop Common
> Issue Type: Bug
> Components: io
> Affects Versions: 2.4.0, 2.6.0, 3.0.0-alpha1
> Reporter: Laurent Goujon
> Assignee: Wei-Chiu Chuang
> Priority: Major
> Attachments: HADOOP-12677.001.patch, HADOOP-12677.002.patch
>
>
> DecompressorStream.skip(long) throws an IndexOutOfBoundException when using a
> long bigger than Integer.MAX_VALUE
> This is because of this cast from long to int:
> https://github.com/apache/hadoop-common/blob/HADOOP-3628/src/core/org/apache/hadoop/io/compress/DecompressorStream.java#L125
> The fix is probably to do the cast after applying Math.min: in that case, it
> should not be an issue since it should not be bigger than the buffer size
> (512)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]