You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Will Pierce (Updated) (JIRA)" <ji...@apache.org> on 2012/02/29 04:08:19 UTC

[jira] [Updated] (THRIFT-1525) Serialization / Deterialization of oversized i32 problematic in TCompactProtocol

     [ https://issues.apache.org/jira/browse/THRIFT-1525?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Will Pierce updated THRIFT-1525:
--------------------------------

    Attachment: THRIFT-1525.compactproto_rangechecks_v1.patch

Patch adds assertions to range check I16, I32 and I64 values (and container lengths vs. i32) in TCompactProtocol.

Also, here's a snippet on pastebin of cheesy test code that explores the negative and positive boundaries of i16, i32 and i64 with writeVarInt from TCompactProto to exercise the assertions:  http://pastebin.com/h6J5s3ae

                
> Serialization / Deterialization of oversized i32 problematic in TCompactProtocol
> --------------------------------------------------------------------------------
>
>                 Key: THRIFT-1525
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1525
>             Project: Thrift
>          Issue Type: Bug
>          Components: Python - Library
>    Affects Versions: 0.8
>            Reporter: Ted Schundler
>            Priority: Minor
>         Attachments: THRIFT-1525.compactproto_rangechecks_v1.patch
>
>
> Serialization of integers outside of the range handled by i32 numbers happens without any errors raised.
> Deserialization yields unexpected results - for example 3000000000 (outside the range of i32) will be deserialized as -3000000000 (also outside the range of i32, and not the same as simply casting the unsigned int as signed)

--
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