Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-19431

The tag array written by IndividualBytesFieldCell#write is out of bounds

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • None
    • 2.0.0-beta-1, 2.0.0
    • None
    • None
    • Reviewed

    Description

      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);
        }
      

      Attachments

        1. HBASE-19431.v0.patch
          2 kB
          Chia-Ping Tsai

        Activity

          People

            chia7712 Chia-Ping Tsai
            chia7712 Chia-Ping Tsai
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: