fishy commented on PR #2605: URL: https://github.com/apache/thrift/pull/2605#issuecomment-1123967231
> By checking error we are sure size is not negative now? Not sure if I getr the idea right. `checkSizeForProtocol` checks both that size is negative and size is too large (> max size allowed), and returns the proper TProtocolException if either case is true: https://github.com/apache/thrift/blob/dae1437ca03834527b654cf5bc8d7f41c9412a20/lib/go/thrift/configuration.go#L305-L319 it's used in all of `T{Binary|Compact|JSON}Protocol.Read{Map|List|Set}Begin`, just that for `TCompactProtocol.ReadListBegin` we have a bug that we checked the wrong size (`size32` here is actually a const, not the size we read from the container). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
