You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Jim Klucar (Created) (JIRA)" <ji...@apache.org> on 2011/12/06 18:13:39 UTC
[jira] [Created] (THRIFT-1448) TCompactProtocol.java incorrect
type/version masks
TCompactProtocol.java incorrect type/version masks
--------------------------------------------------
Key: THRIFT-1448
URL: https://issues.apache.org/jira/browse/THRIFT-1448
Project: Thrift
Issue Type: Bug
Components: Java - Library
Affects Versions: 0.8
Reporter: Jim Klucar
Priority: Minor
The type/version byte for TCompactProtocol isn't being properly decoded. In the readMessageBegin method, the type mask used is 0x03, however the type is represented by 3 bits, so the proper mask is 0x07. Similarly in the getTType method, the type mask is 0x0f, but it should be 0x07 for a 3 bit mask. I only looked in the Java file for this error, perhaps it exists in other libraries.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (THRIFT-1448) TCompactProtocol.java incorrect
type/version masks
Posted by "Bryan Duxbury (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-1448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13168600#comment-13168600 ]
Bryan Duxbury commented on THRIFT-1448:
---------------------------------------
Hm, interesting. I think that you're right, the message type is being decoded improperly, though it appears not to matter since it's never used.
But I don't think the getTType method is wrong. The argument is a compact protocol field type, not a message type, so it actually takes a whole nybble.
> TCompactProtocol.java incorrect type/version masks
> --------------------------------------------------
>
> Key: THRIFT-1448
> URL: https://issues.apache.org/jira/browse/THRIFT-1448
> Project: Thrift
> Issue Type: Bug
> Components: Java - Library
> Affects Versions: 0.8
> Reporter: Jim Klucar
> Priority: Minor
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> The type/version byte for TCompactProtocol isn't being properly decoded. In the readMessageBegin method, the type mask used is 0x03, however the type is represented by 3 bits, so the proper mask is 0x07. Similarly in the getTType method, the type mask is 0x0f, but it should be 0x07 for a 3 bit mask. I only looked in the Java file for this error, perhaps it exists in other libraries.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira