Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.11.0
-
None
Description
When use `TBinaryInputProtocol::new(..., false)`, any trivial example will fail:
service TestService
{ bool Test() }
Problem is here:
https://github.com/apache/thrift/blob/master/lib/rs/src/protocol/binary.rs#L126
with_capacity() allocates space, but len() of resulting Vec<> is 0. read_exact() reads 0 bytes and read_byte() below receives first byte of the string which may or may not convert to TMessageType.
Change it to:
let mut name_buf: Vec<u8> = vec![0; name_size];
Attachments
Issue Links
- links to