[ https://issues.apache.org/jira/browse/THRIFT-1700?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13461042#comment-13461042 ]
Alexey commented on THRIFT-1700: -------------------------------- Execuse me for such small amount of information. I can't reproduce it every time, it just throws sometimes and sometimes not. Yes, this happens in TBinaryProtocol. Here is the exception with call stack: http://pastie.org/4778845 i32rd is the array of 4 bytes: [0] = 129 [1] = 208 [2] = 181 [3] = 208 It also crashes with different i32rd values (e.g. 128, 1, 0, 2); I could also give you all values in current TFramedTransport object. About changing to uint: can you give me a hint what (and where) I need to change in thrift in order to change size to uint? > Number overflow in ReadFrame. > ----------------------------- > > Key: THRIFT-1700 > URL: https://issues.apache.org/jira/browse/THRIFT-1700 > Project: Thrift > Issue Type: Bug > Components: C# - Library > Affects Versions: 0.8 > Reporter: Alexey > > private void ReadFrame() > { > byte[] i32rd = new byte[header_size]; > transport.ReadAll(i32rd, 0, header_size); > int size = > ((i32rd[0] & 0xff) << 24) | > ((i32rd[1] & 0xff) << 16) | > ((i32rd[2] & 0xff) << 8) | > ((i32rd[3] & 0xff)); > byte[] buff = new byte[size]; > transport.ReadAll(buff, 0, size); > readBuffer = new MemoryStream(buff); > } > Here, when calculating size, number overflow throws sometimes. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira