[
https://issues.apache.org/jira/browse/PHOENIX-921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13963858#comment-13963858
]
jay wong edited comment on PHOENIX-921 at 4/9/14 6:13 AM:
----------------------------------------------------------
[~jamestaylor]
Yes. due to I saw the issue occur.
As a result of, my hbase is not closest with de apache hbase version. some key
value packaging not very consistent.
And I also think the server will be never trust client input.
So I consider the kv length check is demandable
was (Author: jaywong):
[~jamestaylor]
Yes. due to I saw the issue occur.
As a result of, my hbase is not closest with de apache hbase version. some key
value packaging not very consistent.
And I also think the server will be never trust user input.
So I consider the kv length check is demandable
> KeyValue check in MetaDataEndpointImpl#addColumnToTable is not sufficiency
> ---------------------------------------------------------------------------
>
> Key: PHOENIX-921
> URL: https://issues.apache.org/jira/browse/PHOENIX-921
> Project: Phoenix
> Issue Type: Bug
> Affects Versions: 3.0.0
> Reporter: jay wong
> Fix For: 3.0.0
>
> Attachments: PHOENIX-921.patch
>
>
> In my using.
> when I create a table with no Index.
> the method MetaDataEndpointImpl#addColumnToTable
> the code like:
> -------
> Integer maxLength = columnSizeKv == null ? null :
> PDataType.INTEGER.getCodec().decodeInt(columnSizeKv.getBuffer(),
> columnSizeKv.getValueOffset(), SortOrder.getDefault());
> -------
> didn't check the columnSizeKv length is 0. if 0, the decodeInt will throw
> exception.
> so I think it will be check like this:
> Integer maxLength = columnSizeKv == null || columnSizeKv .getValue().length
> == 0 ? null :
> PDataType.INTEGER.getCodec().decodeInt(columnSizeKv.getBuffer(),
> columnSizeKv.getValueOffset(), SortOrder.getDefault());
--
This message was sent by Atlassian JIRA
(v6.2#6252)