You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "shuo li (Jira)" <ji...@apache.org> on 2020/10/28 05:23:00 UTC

[jira] [Closed] (THRIFT-5299) rs implementation compact protocol varint implementation is wrong

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

shuo li closed THRIFT-5299.
---------------------------
    Resolution: Won't Fix

After reading other lang implementations, current impl is correct, though the specification should be cleaner.

> rs implementation compact protocol varint implementation is wrong
> -----------------------------------------------------------------
>
>                 Key: THRIFT-5299
>                 URL: https://issues.apache.org/jira/browse/THRIFT-5299
>             Project: Thrift
>          Issue Type: Bug
>          Components: Rust - Library
>    Affects Versions: 0.13.0
>            Reporter: shuo li
>            Priority: Major
>
> While reviewing code, I discovered a bug in compact protocol.
> The length of byte is decoded with integer-encoding u32, which does not do zigzag decode first. 
> The fix should be use i32 as decode, then convert to unsigned value.
> In specification, it is explicitly specified that the length field is SIGNED.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)