You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Christian Asmussen (Jira)" <ji...@apache.org> on 2021/01/02 04:19:00 UTC

[jira] [Created] (HADOOP-17453) BZip2Codec incorrectly throws IndexOutOfBoundsException: offs(X) + len(X+1) > dest.length(Y).

Christian Asmussen created HADOOP-17453:
-------------------------------------------

             Summary: BZip2Codec incorrectly throws IndexOutOfBoundsException: offs(X) + len(X+1) > dest.length(Y).
                 Key: HADOOP-17453
                 URL: https://issues.apache.org/jira/browse/HADOOP-17453
             Project: Hadoop Common
          Issue Type: Bug
          Components: common
    Affects Versions: 3.1.2
            Reporter: Christian Asmussen


In org.apache.hadoop.io.compress.BZip2Codec$BZip2CompressionInputStream
 around line 496 seems to mistakenly add the offset to the length.
{noformat}
      if (this.posSM == POS_ADVERTISEMENT_STATE_MACHINE.ADVERTISE) {
        result = this.input.read(b, off, off + 1 << HERE);
{noformat}

Here's a reference [BZip2Codec.java:L496|https://github.com/apache/hadoop/blob/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/BZip2Codec.java#L496]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-dev-help@hadoop.apache.org