hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chia-Ping Tsai (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HBASE-19431) The tag array written by IndividualBytesFieldCell#write is out of bounds
Date Tue, 05 Dec 2017 06:17:00 GMT
Chia-Ping Tsai created HBASE-19431:
--------------------------------------

             Summary: The tag array written by IndividualBytesFieldCell#write is out of bounds
                 Key: HBASE-19431
                 URL: https://issues.apache.org/jira/browse/HBASE-19431
             Project: HBase
          Issue Type: Bug
            Reporter: Chia-Ping Tsai
            Assignee: Chia-Ping Tsai
            Priority: Critical
             Fix For: 2.0.0-beta-1


{code:title=IndividualBytesFieldCell.java}
  @Override
  public int write(OutputStream out, boolean withTags) throws IOException {
    // Key length and then value length
    ByteBufferUtils.putInt(out, KeyValueUtil.keyLength(this));
    ByteBufferUtils.putInt(out, getValueLength());

    // Key
    PrivateCellUtil.writeFlatKey(this, out);

    // Value
    out.write(getValueArray());

    // Tags length and tags byte array
    if (withTags && getTagsLength() > 0) {
      // Tags length
      out.write((byte)(0xff & (getTagsLength() >> 8)));
      out.write((byte)(0xff & getTagsLength()));

      // Tags byte array
      out.write(tags);   // here
    }

    return getSerializedSize(withTags);
  }
{code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message