You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Bryan Duxbury (Closed) (JIRA)" <ji...@apache.org> on 2011/09/27 00:09:12 UTC
[jira] [Closed] (THRIFT-1365) TupleProtocol#writeBitSet
unintentionally writes a variable length byte array
[ https://issues.apache.org/jira/browse/THRIFT-1365?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bryan Duxbury closed THRIFT-1365.
---------------------------------
Resolution: Fixed
> TupleProtocol#writeBitSet unintentionally writes a variable length byte array
> -----------------------------------------------------------------------------
>
> Key: THRIFT-1365
> URL: https://issues.apache.org/jira/browse/THRIFT-1365
> Project: Thrift
> Issue Type: Bug
> Components: Java - Compiler, Java - Library
> Reporter: Bryan Duxbury
> Assignee: Bryan Duxbury
> Fix For: 0.8
>
> Attachments: thrift-1365.patch
>
>
> BitSet.length() only returns the highest-set-bit, meaning that if you have more than 8 optional fields, and the 9+th optional field is unset, then only the first byte's worth of bits will be serialized. This leads to a problem on the read side, where the bit vector is assumed to be fixed width, and arbitrary deserialization occurs.
--
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